mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 02:52:54 +08:00
Add relative size toggle to DefaultSongProgress
too
This commit is contained in:
parent
bb4f3c71e0
commit
47f10693c4
@ -37,6 +37,9 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowTime), nameof(SongProgressStrings.ShowTimeDescription))]
|
[SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowTime), nameof(SongProgressStrings.ShowTimeDescription))]
|
||||||
public Bindable<bool> ShowTime { get; } = new BindableBool(true);
|
public Bindable<bool> ShowTime { get; } = new BindableBool(true);
|
||||||
|
|
||||||
|
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.UseRelativeSize))]
|
||||||
|
public BindableBool UseRelativeSize { get; } = new BindableBool(true);
|
||||||
|
|
||||||
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
|
[SettingSource(typeof(SkinnableComponentStrings), nameof(SkinnableComponentStrings.Colour), nameof(SkinnableComponentStrings.ColourDescription))]
|
||||||
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
|
public BindableColour4 AccentColour { get; } = new BindableColour4(Colour4.White);
|
||||||
|
|
||||||
@ -83,6 +86,11 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
graph.FillColour = bar.FillColour = colours.BlueLighter;
|
graph.FillColour = bar.FillColour = colours.BlueLighter;
|
||||||
|
|
||||||
|
// 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 LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
Loading…
Reference in New Issue
Block a user