summaryrefslogtreecommitdiff
path: root/src/SMAPI/IInputHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/IInputHelper.cs')
-rw-r--r--src/SMAPI/IInputHelper.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/SMAPI/IInputHelper.cs b/src/SMAPI/IInputHelper.cs
new file mode 100644
index 00000000..328f504b
--- /dev/null
+++ b/src/SMAPI/IInputHelper.cs
@@ -0,0 +1,21 @@
+namespace StardewModdingAPI
+{
+ /// <summary>Provides an API for checking and changing input state.</summary>
+ public interface IInputHelper : IModLinked
+ {
+ /// <summary>Get the current cursor position.</summary>
+ ICursorPosition GetCursorPosition();
+
+ /// <summary>Get whether a button is currently pressed.</summary>
+ /// <param name="button">The button.</param>
+ bool IsDown(SButton button);
+
+ /// <summary>Get whether a button is currently suppressed, so the game won't see it.</summary>
+ /// <param name="button">The button.</param>
+ bool IsSuppressed(SButton button);
+
+ /// <summary>Prevent the game from handling a button press. This doesn't prevent other mods from receiving the event.</summary>
+ /// <param name="button">The button to suppress.</param>
+ void Suppress(SButton button);
+ }
+}