mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 10:33:22 +08:00
Make BackButtonVisibility
in game class private
This commit is contained in:
parent
3e1b4f4ac5
commit
4ae3ccfe48
@ -178,7 +178,7 @@ namespace osu.Game
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the back button is currently displayed.
|
/// Whether the back button is currently displayed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly IBindable<bool> BackButtonVisibility = new Bindable<bool>();
|
private readonly IBindable<bool> backButtonVisibility = new Bindable<bool>();
|
||||||
|
|
||||||
IBindable<LocalUserPlayingState> ILocalUserPlayInfo.PlayingState => playingState;
|
IBindable<LocalUserPlayingState> ILocalUserPlayInfo.PlayingState => playingState;
|
||||||
|
|
||||||
@ -1194,7 +1194,7 @@ namespace osu.Game
|
|||||||
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();
|
if (mode.NewValue != OverlayActivation.All) CloseAllOverlays();
|
||||||
};
|
};
|
||||||
|
|
||||||
BackButtonVisibility.ValueChanged += visible =>
|
backButtonVisibility.ValueChanged += visible =>
|
||||||
{
|
{
|
||||||
if (visible.NewValue)
|
if (visible.NewValue)
|
||||||
BackButton.Show();
|
BackButton.Show();
|
||||||
@ -1594,14 +1594,14 @@ namespace osu.Game
|
|||||||
|
|
||||||
if (current is IOsuScreen currentOsuScreen)
|
if (current is IOsuScreen currentOsuScreen)
|
||||||
{
|
{
|
||||||
BackButtonVisibility.UnbindFrom(currentOsuScreen.BackButtonVisibility);
|
backButtonVisibility.UnbindFrom(currentOsuScreen.BackButtonVisibility);
|
||||||
OverlayActivationMode.UnbindFrom(currentOsuScreen.OverlayActivationMode);
|
OverlayActivationMode.UnbindFrom(currentOsuScreen.OverlayActivationMode);
|
||||||
API.Activity.UnbindFrom(currentOsuScreen.Activity);
|
API.Activity.UnbindFrom(currentOsuScreen.Activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newScreen is IOsuScreen newOsuScreen)
|
if (newScreen is IOsuScreen newOsuScreen)
|
||||||
{
|
{
|
||||||
BackButtonVisibility.BindTo(newOsuScreen.BackButtonVisibility);
|
backButtonVisibility.BindTo(newOsuScreen.BackButtonVisibility);
|
||||||
OverlayActivationMode.BindTo(newOsuScreen.OverlayActivationMode);
|
OverlayActivationMode.BindTo(newOsuScreen.OverlayActivationMode);
|
||||||
API.Activity.BindTo(newOsuScreen.Activity);
|
API.Activity.BindTo(newOsuScreen.Activity);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user