From bfe6537f84fe780197c4554f360f19c3f9f12371 Mon Sep 17 00:00:00 2001 From: ClxS Date: Sun, 6 Mar 2016 19:46:47 +0000 Subject: Added KeyReleased event --- StardewModdingAPI/Events/Controls.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'StardewModdingAPI/Events/Controls.cs') diff --git a/StardewModdingAPI/Events/Controls.cs b/StardewModdingAPI/Events/Controls.cs index ace890ca..8cf0f431 100644 --- a/StardewModdingAPI/Events/Controls.cs +++ b/StardewModdingAPI/Events/Controls.cs @@ -11,6 +11,7 @@ namespace StardewModdingAPI.Events { public static event EventHandler KeyboardChanged = delegate { }; public static event EventHandler KeyPressed = delegate { }; + public static event EventHandler KeyReleased = delegate { }; public static event EventHandler MouseChanged = delegate { }; public static void InvokeKeyboardChanged(KeyboardState priorState, KeyboardState newState) @@ -27,5 +28,10 @@ namespace StardewModdingAPI.Events { KeyPressed.Invoke(null, new EventArgsKeyPressed(key)); } + + public static void InvokeKeyReleased(Keys key) + { + KeyReleased.Invoke(null, new EventArgsKeyPressed(key)); + } } } -- cgit