1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:35:05 +08:00

Make it possible to change the overlay actions beyond instantiation

This commit is contained in:
smoogipoo 2017-12-18 19:13:25 +09:00
parent a17b2e4c18
commit 5e111e14db
2 changed files with 5 additions and 5 deletions

View File

@ -18,8 +18,8 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
AddButton("Retry", colours.YellowDark, OnRetry); AddButton("Retry", colours.YellowDark, () => OnRetry?.Invoke());
AddButton("Quit", new Color4(170, 27, 39, 255), OnQuit); AddButton("Quit", new Color4(170, 27, 39, 255), () => OnQuit?.Invoke());
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)

View File

@ -140,9 +140,9 @@ namespace osu.Game.Screens.Play
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
AddButton("Continue", colours.Green, OnResume); AddButton("Continue", colours.Green, () => OnResume?.Invoke());
AddButton("Retry", colours.YellowDark, OnRetry); AddButton("Retry", colours.YellowDark, () => OnRetry?.Invoke());
AddButton("Quit", new Color4(170, 27, 39, 255), OnQuit); AddButton("Quit", new Color4(170, 27, 39, 255), () => OnQuit?.Invoke());
} }
} }
} }