summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Events/Controls.cs
diff options
context:
space:
mode:
authorClxS <slxxls92@gmail.com>2016-03-06 19:46:47 +0000
committerClxS <slxxls92@gmail.com>2016-03-06 19:46:47 +0000
commitbfe6537f84fe780197c4554f360f19c3f9f12371 (patch)
tree694c52d73f4929e008996d9f21223ae9d4756dbb /StardewModdingAPI/Events/Controls.cs
parent126ce53618719f6734125669e1466f681be49a78 (diff)
downloadSMAPI-bfe6537f84fe780197c4554f360f19c3f9f12371.tar.gz
SMAPI-bfe6537f84fe780197c4554f360f19c3f9f12371.tar.bz2
SMAPI-bfe6537f84fe780197c4554f360f19c3f9f12371.zip
Added KeyReleased event
Diffstat (limited to 'StardewModdingAPI/Events/Controls.cs')
-rw-r--r--StardewModdingAPI/Events/Controls.cs6
1 files changed, 6 insertions, 0 deletions
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<EventArgsKeyboardStateChanged> KeyboardChanged = delegate { };
public static event EventHandler<EventArgsKeyPressed> KeyPressed = delegate { };
+ public static event EventHandler<EventArgsKeyPressed> KeyReleased = delegate { };
public static event EventHandler<EventArgsMouseStateChanged> 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));
+ }
}
}