Simplify hiding logic

This commit is contained in:
EVAST9919 2017-05-02 22:59:36 +03:00
parent 37c3133981
commit a955f9cbfd

View File

@ -16,11 +16,9 @@ namespace osu.Game.Screens.Play
{ {
private readonly FillFlowContainer<ModIcon> iconsContainer; private readonly FillFlowContainer<ModIcon> iconsContainer;
private bool showMods;
public bool ShowMods public bool ShowMods
{ {
get { return showMods; } set { if (!value) Hide(); }
set { showMods = value; }
} }
public ModsContainer() public ModsContainer()
@ -70,14 +68,5 @@ namespace osu.Game.Screens.Play
default: return Color4.White; default: return Color4.White;
} }
} }
[BackgroundDependencyLoader]
private void load()
{
if (ShowMods)
Show();
else
Hide();
}
} }
} }