mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Update VisibilityContainer usage in line with framework
This commit is contained in:
@ -54,7 +54,7 @@ namespace osu.Game.Graphics.Containers
|
||||
samplePopIn = audio.Samples.Get(@"UI/overlay-pop-in");
|
||||
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
|
||||
|
||||
StateChanged += onStateChanged;
|
||||
State.ValueChanged += onStateChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -70,7 +70,7 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
if (!base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
|
||||
{
|
||||
State = Visibility.Hidden;
|
||||
Hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ namespace osu.Game.Graphics.Containers
|
||||
switch (action)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
State = Visibility.Hidden;
|
||||
Hide();
|
||||
return true;
|
||||
|
||||
case GlobalAction.Select:
|
||||
@ -94,9 +94,9 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
public bool OnReleased(GlobalAction action) => false;
|
||||
|
||||
private void onStateChanged(Visibility visibility)
|
||||
private void onStateChanged(ValueChangedEvent<Visibility> state)
|
||||
{
|
||||
switch (visibility)
|
||||
switch (state.NewValue)
|
||||
{
|
||||
case Visibility.Visible:
|
||||
if (OverlayActivationMode.Value != OverlayActivation.Disabled)
|
||||
@ -105,7 +105,7 @@ namespace osu.Game.Graphics.Containers
|
||||
if (BlockScreenWideMouse && DimMainContent) osuGame?.AddBlockingOverlay(this);
|
||||
}
|
||||
else
|
||||
State = Visibility.Hidden;
|
||||
Hide();
|
||||
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user