1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 12:27:26 +08:00

Add Use relative size setting to ArgonSongProgress

This commit is contained in:
SupDos 2024-10-18 01:47:54 +02:00
parent 3bcd6b9af5
commit 7d0da79db7

View File

@ -30,6 +30,9 @@ namespace osu.Game.Screens.Play.HUD
[SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowTime), nameof(SongProgressStrings.ShowTimeDescription))]
public Bindable<bool> ShowTime { get; } = new BindableBool(true);
[SettingSource("Use relative size")]
public BindableBool UseRelativeSize { get; } = new BindableBool(true);
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
@ -99,6 +102,11 @@ namespace osu.Game.Screens.Play.HUD
ShowGraph.BindValueChanged(_ => updateGraphVisibility(), true);
ShowTime.BindValueChanged(_ => info.FadeTo(ShowTime.Value ? 1 : 0, 200, Easing.In), true);
AccentColour.BindValueChanged(_ => Colour = AccentColour.Value, true);
// see comment in ArgonHealthDisplay.cs regarding RelativeSizeAxes
float previousWidth = Width;
UseRelativeSize.BindValueChanged(v => RelativeSizeAxes = v.NewValue ? Axes.X : Axes.None, true);
Width = previousWidth;
}
protected override void UpdateObjects(IEnumerable<HitObject> objects)