mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Fix Use24HourDisplay
conditional flipped
This commit is contained in:
parent
b2c0eaeab4
commit
c323020fcf
@ -40,6 +40,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
return;
|
||||
|
||||
use24HourDisplay = value;
|
||||
|
||||
updateMetrics();
|
||||
UpdateDisplay(DateTimeOffset.Now); //Update realTime.Text immediately instead of waiting until next second
|
||||
}
|
||||
@ -66,7 +67,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
|
||||
protected override void UpdateDisplay(DateTimeOffset now)
|
||||
{
|
||||
realTime.Text = use24HourDisplay ? $"{now:h:mm:ss tt}" : $"{now:HH:mm:ss}";
|
||||
realTime.Text = use24HourDisplay ? $"{now:HH:mm:ss}" : $"{now:h:mm:ss tt}";
|
||||
gameTime.Text = $"running {new TimeSpan(TimeSpan.TicksPerSecond * (int)(Clock.CurrentTime / 1000)):c}";
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
analog.FadeTo(showAnalog ? 1 : 0);
|
||||
}, true);
|
||||
|
||||
prefer24HourTime.BindValueChanged(prefer24H => digital.Use24HourDisplay = !prefer24H.NewValue, true);
|
||||
prefer24HourTime.BindValueChanged(prefer24H => digital.Use24HourDisplay = prefer24H.NewValue, true);
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user