From 6826391b7a821738a0176448fc5660eb45f6b1fa Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Wed, 31 Aug 2016 23:15:17 +0800 Subject: [PATCH] Replace custom delegates by generic delegates. --- osu.Game/GameModes/FieldTest.cs | 2 +- osu.Game/GameModes/Menu/ButtonSystem.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/GameModes/FieldTest.cs b/osu.Game/GameModes/FieldTest.cs index 7bf71068d6..a27698cdc1 100644 --- a/osu.Game/GameModes/FieldTest.cs +++ b/osu.Game/GameModes/FieldTest.cs @@ -118,7 +118,7 @@ namespace osu.Game.GameModes Colour = colour ?? Color4.White; } - internal event VoidDelegate Activated; + internal event Action Activated; protected override bool OnClick(InputState state) { diff --git a/osu.Game/GameModes/Menu/ButtonSystem.cs b/osu.Game/GameModes/Menu/ButtonSystem.cs index 5e9350b465..f140b0f247 100644 --- a/osu.Game/GameModes/Menu/ButtonSystem.cs +++ b/osu.Game/GameModes/Menu/ButtonSystem.cs @@ -277,7 +277,7 @@ namespace osu.Game.GameModes.Menu private Sprite logo; private Container logoBounceContainer; private MenuVisualisation vis; - private VoidDelegate clickAction; + private Action clickAction; public float SizeForFlow => logo == null ? 0 : logo.ActualSize.X * logo.Scale * logoBounceContainer.Scale * 0.8f; @@ -319,7 +319,7 @@ namespace osu.Game.GameModes.Menu }); } - public OsuLogo(VoidDelegate action) + public OsuLogo(Action action) { clickAction = action; } @@ -396,14 +396,14 @@ namespace osu.Game.GameModes.Menu private TextAwesome icon; private string internalName; private readonly FontAwesome symbol; - private VoidDelegate clickAction; + private Action clickAction; private readonly float extraWidth; private Key triggerKey; private string text; public override Quad ScreenSpaceInputQuad => box.ScreenSpaceInputQuad; - public Button(string text, string internalName, FontAwesome symbol, Color4 colour, VoidDelegate clickAction = null, float extraWidth = 0, Key triggerKey = Key.Unknown) + public Button(string text, string internalName, FontAwesome symbol, Color4 colour, Action clickAction = null, float extraWidth = 0, Key triggerKey = Key.Unknown) { this.internalName = internalName; this.symbol = symbol;