mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +08:00
Merge branch 'master' into more-import-lenience
This commit is contained in:
commit
285284eb34
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
@ -38,6 +39,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
|
||||
private readonly Bindable<double> displayedStars = new BindableDouble();
|
||||
|
||||
private readonly Container textContainer;
|
||||
|
||||
/// <summary>
|
||||
/// The currently displayed stars of this display wrapped in a bindable.
|
||||
/// This bindable gets transformed on change rather than instantaneous, if animation is enabled.
|
||||
@ -116,15 +119,19 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
Size = new Vector2(8f),
|
||||
},
|
||||
Empty(),
|
||||
starsText = new OsuSpriteText
|
||||
textContainer = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Margin = new MarginPadding { Bottom = 1.5f },
|
||||
// todo: this should be size: 12f, but to match up with the design, it needs to be 14.4f
|
||||
// see https://github.com/ppy/osu-framework/issues/3271.
|
||||
Font = OsuFont.Torus.With(size: 14.4f, weight: FontWeight.Bold),
|
||||
Shadow = false,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Child = starsText = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Margin = new MarginPadding { Bottom = 1.5f },
|
||||
// todo: this should be size: 12f, but to match up with the design, it needs to be 14.4f
|
||||
// see https://github.com/ppy/osu-framework/issues/3271.
|
||||
Font = OsuFont.Torus.With(size: 14.4f, weight: FontWeight.Bold),
|
||||
Shadow = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -155,6 +162,11 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
|
||||
starIcon.Colour = s.NewValue >= 6.5 ? colours.Orange1 : colourProvider?.Background5 ?? Color4Extensions.FromHex("303d47");
|
||||
starsText.Colour = s.NewValue >= 6.5 ? colours.Orange1 : colourProvider?.Background5 ?? Color4.Black.Opacity(0.75f);
|
||||
|
||||
// In order to avoid autosize throwing the width of these displays all over the place,
|
||||
// let's lock in some sane defaults for the text width based on how many digits we're
|
||||
// displaying.
|
||||
textContainer.Width = 24 + Math.Max(starsText.Text.ToString().Length - 4, 0) * 6;
|
||||
}, true);
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
private void startAnimating()
|
||||
{
|
||||
Content.AutoSizeEasing = Easing.OutQuint;
|
||||
Content.AutoSizeDuration = transition_duration;
|
||||
LeftContent.AutoSizeEasing = Content.AutoSizeEasing = Easing.OutQuint;
|
||||
LeftContent.AutoSizeDuration = Content.AutoSizeDuration = transition_duration;
|
||||
}
|
||||
|
||||
private void updateValues() => Scheduler.AddOnce(() =>
|
||||
|
@ -82,7 +82,8 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
Origin = Anchor.CentreLeft,
|
||||
Anchor = Anchor.CentreLeft,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Width = 50,
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -139,9 +139,12 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
/// <summary>
|
||||
/// A special result used as a padding value for legacy rulesets. It is a hit type and affects combo, but does not affect the base score (does not affect accuracy).
|
||||
///
|
||||
/// DO NOT USE FOR ANYTHING EVER.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// DO NOT USE.
|
||||
/// This is used when dealing with legacy scores, which historically only have counts stored for 300/100/50/miss.
|
||||
/// For these scores, we pad the hit statistics with `LegacyComboIncrease` to meet the correct max combo for the score.
|
||||
/// </remarks>
|
||||
[EnumMember(Value = "legacy_combo_increase")]
|
||||
[Order(99)]
|
||||
|
@ -25,6 +25,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private readonly Score score;
|
||||
|
||||
public override bool AllowBackButton => true;
|
||||
|
||||
protected override bool CheckModsAllowFailure()
|
||||
{
|
||||
if (!allowFail)
|
||||
|
@ -37,7 +37,7 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Realm" Version="11.5.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2023.1213.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.1127.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.1215.0" />
|
||||
<PackageReference Include="Sentry" Version="3.40.0" />
|
||||
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
|
||||
<PackageReference Include="SharpCompress" Version="0.33.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user