Update VisibilityContainer usage in line with framework

This commit is contained in:
Dean Herbert
2019-06-11 14:28:52 +09:00
parent 164b05abd6
commit 609a82bc94
50 changed files with 150 additions and 127 deletions

View File

@ -56,12 +56,12 @@ namespace osu.Game.Screens.Menu
case ButtonSystemState.Exit:
case ButtonSystemState.Initial:
case ButtonSystemState.EnteringMode:
State = Visibility.Hidden;
Hide();
break;
case ButtonSystemState.TopLevel:
case ButtonSystemState.Play:
State = Visibility.Visible;
Show();
break;
}
@ -82,6 +82,10 @@ namespace osu.Game.Screens.Menu
}
}
public override void Hide() => State = Visibility.Hidden;
public override void Show() => State = Visibility.Visible;
public event Action<Visibility> StateChanged;
private class ButtonAreaBackground : Box, IStateful<ButtonAreaBackgroundState>