summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Events/Controls.cs
diff options
context:
space:
mode:
authorClxS <slxxls92@gmail.com>2016-03-07 17:25:51 +0000
committerClxS <slxxls92@gmail.com>2016-03-07 17:25:51 +0000
commit0462c9de79a2f1a02e720ac24400d1bf00f74680 (patch)
tree9b33ca49e7780ac3597908a487a82efa779c7eb1 /StardewModdingAPI/Events/Controls.cs
parentba6420efac4a3cb158ea343b926ba5cfeaf783a8 (diff)
downloadSMAPI-0462c9de79a2f1a02e720ac24400d1bf00f74680.tar.gz
SMAPI-0462c9de79a2f1a02e720ac24400d1bf00f74680.tar.bz2
SMAPI-0462c9de79a2f1a02e720ac24400d1bf00f74680.zip
Finished gamepad input events
Diffstat (limited to 'StardewModdingAPI/Events/Controls.cs')
-rw-r--r--StardewModdingAPI/Events/Controls.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/StardewModdingAPI/Events/Controls.cs b/StardewModdingAPI/Events/Controls.cs
index fa344bab..c79c28f6 100644
--- a/StardewModdingAPI/Events/Controls.cs
+++ b/StardewModdingAPI/Events/Controls.cs
@@ -16,6 +16,8 @@ namespace StardewModdingAPI.Events
public static event EventHandler<EventArgsMouseStateChanged> MouseChanged = delegate { };
public static event EventHandler<EventArgsControllerButtonPressed> ControllerButtonPressed = delegate { };
public static event EventHandler<EventArgsControllerButtonReleased> ControllerButtonReleased = delegate { };
+ public static event EventHandler<EventArgsControllerTriggerPressed> ControllerTriggerPressed = delegate { };
+ public static event EventHandler<EventArgsControllerTriggerReleased> ControllerTriggerReleased = delegate { };
public static void InvokeKeyboardChanged(KeyboardState priorState, KeyboardState newState)
{
@@ -46,5 +48,15 @@ namespace StardewModdingAPI.Events
{
ControllerButtonReleased.Invoke(null, new EventArgsControllerButtonReleased(playerIndex, buttons));
}
+
+ public static void InvokeTriggerPressed(PlayerIndex playerIndex, Buttons buttons, float value)
+ {
+ ControllerTriggerPressed.Invoke(null, new EventArgsControllerTriggerPressed(playerIndex, buttons, value));
+ }
+
+ public static void InvokeTriggerReleased(PlayerIndex playerIndex, Buttons buttons, float value)
+ {
+ ControllerTriggerReleased.Invoke(null, new EventArgsControllerTriggerReleased(playerIndex, buttons, value));
+ }
}
}