mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Remove custom back action logic (use receptor as intended)
This commit is contained in:
@ -16,10 +16,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
private readonly TwoLayerButton button;
|
||||
|
||||
public BackButton(Receptor receptor)
|
||||
public BackButton(Receptor receptor = null)
|
||||
{
|
||||
receptor.OnBackPressed = () => button.Click();
|
||||
|
||||
Size = TwoLayerButton.SIZE_EXTENDED;
|
||||
|
||||
Child = button = new TwoLayerButton
|
||||
@ -30,6 +28,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Icon = OsuIcon.LeftCircle,
|
||||
Action = () => Action?.Invoke()
|
||||
};
|
||||
|
||||
Add(receptor ??= new Receptor());
|
||||
|
||||
receptor.OnBackPressed = () => button.Click();
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
Reference in New Issue
Block a user