mirror of https://github.com/ppy/osu
Use newly exposed UpdateState
This commit is contained in:
parent
28825d4077
commit
ac0abe0692
|
@ -55,15 +55,6 @@ private void load(AudioManager audio)
|
|||
samplePopOut = audio.Samples.Get(@"UI/overlay-pop-out");
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
// This must be added after the base LoadComplete, since onStateChanged contains logic that
|
||||
// must be run after other state change logic has been completed.
|
||||
State.ValueChanged += onStateChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether mouse input should be blocked screen-wide while this overlay is visible.
|
||||
/// Performing mouse actions outside of the valid extents will hide the overlay.
|
||||
|
@ -101,8 +92,10 @@ public virtual bool OnPressed(GlobalAction action)
|
|||
|
||||
public bool OnReleased(GlobalAction action) => false;
|
||||
|
||||
private void onStateChanged(ValueChangedEvent<Visibility> state)
|
||||
protected override void UpdateState(ValueChangedEvent<Visibility> state)
|
||||
{
|
||||
base.UpdateState(state);
|
||||
|
||||
switch (state.NewValue)
|
||||
{
|
||||
case Visibility.Visible:
|
||||
|
|
Loading…
Reference in New Issue