diff --git a/osu.Game/Screens/Play/Options/OptionContainer.cs b/osu.Game/Screens/Play/Options/OptionContainer.cs index f7818a7d4c..bf5d4a1863 100644 --- a/osu.Game/Screens/Play/Options/OptionContainer.cs +++ b/osu.Game/Screens/Play/Options/OptionContainer.cs @@ -20,6 +20,7 @@ public abstract class OptionContainer : Container public abstract string Title { get; } private readonly FillFlowContainer content; + private bool contentIsVisible; protected OptionContainer() { @@ -71,6 +72,7 @@ protected OptionContainer() Position = new Vector2(-15,0), Icon = FontAwesome.fa_bars, Scale = new Vector2(0.7f), + Action = () => triggerContentVisibility(), }, } }, @@ -93,5 +95,15 @@ protected OptionContainer() { content.Add(drawable); } + + private void triggerContentVisibility() + { + if (contentIsVisible) + content.Show(); + else + content.Hide(); + + contentIsVisible = !contentIsVisible; + } } }