mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Update in-line with framework changes.
This commit is contained in:
@ -28,6 +28,8 @@ namespace osu.Game.Screens.Menu
|
||||
/// </summary>
|
||||
public class Button : BeatSyncedContainer, IStateful<ButtonState>
|
||||
{
|
||||
public event Action<ButtonState> StateChanged;
|
||||
|
||||
private readonly Container iconText;
|
||||
private readonly Container box;
|
||||
private readonly Box boxHoverLayer;
|
||||
@ -266,6 +268,8 @@ namespace osu.Game.Screens.Menu
|
||||
this.FadeOut(explode_duration / 4f * 3);
|
||||
break;
|
||||
}
|
||||
|
||||
StateChanged?.Invoke(State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
public class ButtonSystem : Container, IStateful<MenuState>
|
||||
{
|
||||
public event Action<MenuState> StateChanged;
|
||||
|
||||
public Action OnEdit;
|
||||
public Action OnExit;
|
||||
public Action OnDirect;
|
||||
@ -294,6 +296,8 @@ namespace osu.Game.Screens.Menu
|
||||
backButton.State = state == MenuState.Play ? ButtonState.Expanded : ButtonState.Contracted;
|
||||
settingsButton.State = state == MenuState.TopLevel ? ButtonState.Expanded : ButtonState.Contracted;
|
||||
}
|
||||
|
||||
StateChanged?.Invoke(State);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user