mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 03:43:00 +08:00
Simplify hiding logic
This commit is contained in:
parent
37c3133981
commit
a955f9cbfd
@ -16,11 +16,9 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
private readonly FillFlowContainer<ModIcon> iconsContainer;
|
||||
|
||||
private bool showMods;
|
||||
public bool ShowMods
|
||||
{
|
||||
get { return showMods; }
|
||||
set { showMods = value; }
|
||||
set { if (!value) Hide(); }
|
||||
}
|
||||
|
||||
public ModsContainer()
|
||||
@ -70,14 +68,5 @@ namespace osu.Game.Screens.Play
|
||||
default: return Color4.White;
|
||||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
if (ShowMods)
|
||||
Show();
|
||||
else
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user