diff --git a/osu.Game/Localisation/HUD/SongProgressStrings.cs b/osu.Game/Localisation/HUD/SongProgressStrings.cs
index 4c621e8e8c..332f15cb17 100644
--- a/osu.Game/Localisation/HUD/SongProgressStrings.cs
+++ b/osu.Game/Localisation/HUD/SongProgressStrings.cs
@@ -19,6 +19,16 @@ namespace osu.Game.Localisation.HUD
///
public static LocalisableString ShowGraphDescription => new TranslatableString(getKey(@"show_graph_description"), "Whether a graph displaying difficulty throughout the beatmap should be shown");
+ ///
+ /// "Show time"
+ ///
+ public static LocalisableString ShowTime => new TranslatableString(getKey(@"show_time"), "Show time");
+
+ ///
+ /// "Whether the passed and remaining time should be shown"
+ ///
+ public static LocalisableString ShowTimeDescription => new TranslatableString(getKey(@"show_time_description"), "Whether the passed and remaining time should be shown");
+
private static string getKey(string key) => $"{prefix}:{key}";
}
}
diff --git a/osu.Game/Screens/Play/HUD/ArgonSongProgress.cs b/osu.Game/Screens/Play/HUD/ArgonSongProgress.cs
index 7db3f9fd3c..ebebfebfb3 100644
--- a/osu.Game/Screens/Play/HUD/ArgonSongProgress.cs
+++ b/osu.Game/Screens/Play/HUD/ArgonSongProgress.cs
@@ -26,6 +26,9 @@ namespace osu.Game.Screens.Play.HUD
[SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowGraph), nameof(SongProgressStrings.ShowGraphDescription))]
public Bindable ShowGraph { get; } = new BindableBool(true);
+ [SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowTime), nameof(SongProgressStrings.ShowTimeDescription))]
+ public Bindable ShowTime { get; } = new BindableBool(true);
+
[Resolved]
private Player? player { get; set; }
@@ -90,6 +93,7 @@ namespace osu.Game.Screens.Play.HUD
Interactive.BindValueChanged(_ => bar.Interactive = Interactive.Value, true);
ShowGraph.BindValueChanged(_ => updateGraphVisibility(), true);
+ ShowTime.BindValueChanged(_ => info.FadeTo(ShowTime.Value ? 1 : 0, 200, Easing.In), true);
}
protected override void UpdateObjects(IEnumerable objects)
diff --git a/osu.Game/Screens/Play/HUD/DefaultSongProgress.cs b/osu.Game/Screens/Play/HUD/DefaultSongProgress.cs
index f01c11855c..1586ac72a1 100644
--- a/osu.Game/Screens/Play/HUD/DefaultSongProgress.cs
+++ b/osu.Game/Screens/Play/HUD/DefaultSongProgress.cs
@@ -33,6 +33,9 @@ namespace osu.Game.Screens.Play.HUD
[SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowGraph), nameof(SongProgressStrings.ShowGraphDescription))]
public Bindable ShowGraph { get; } = new BindableBool(true);
+ [SettingSource(typeof(SongProgressStrings), nameof(SongProgressStrings.ShowTime), nameof(SongProgressStrings.ShowTimeDescription))]
+ public Bindable ShowTime { get; } = new BindableBool(true);
+
[Resolved]
private Player? player { get; set; }
@@ -82,9 +85,11 @@ namespace osu.Game.Screens.Play.HUD
{
Interactive.BindValueChanged(_ => updateBarVisibility(), true);
ShowGraph.BindValueChanged(_ => updateGraphVisibility(), true);
+ ShowTime.BindValueChanged(_ => updateTimeVisibility(), true);
base.LoadComplete();
}
+
protected override void UpdateObjects(IEnumerable objects)
{
@@ -129,6 +134,14 @@ namespace osu.Game.Screens.Play.HUD
updateInfoMargin();
}
+ private void updateTimeVisibility()
+ {
+ info.FadeTo(ShowTime.Value ? 1 : 0, transition_duration, Easing.In);
+
+ updateInfoMargin();
+ }
+
+
private void updateInfoMargin()
{
float finalMargin = bottom_bar_height + (Interactive.Value ? handle_size.Y : 0) + (ShowGraph.Value ? graph_height : 0);