summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/ButtonReleasedEventArgs.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-03-08 11:45:55 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-03-08 11:45:55 -0400
commit29fdf9ae4a91131f758035ab79fbfe0595ff1eca (patch)
tree4986787e17dc7d7da76679fc14c1c724802cf2bf /src/SMAPI/Events/ButtonReleasedEventArgs.cs
parent1b282f950ad068fef581fbebba493ca9f952a5c7 (diff)
downloadSMAPI-29fdf9ae4a91131f758035ab79fbfe0595ff1eca.tar.gz
SMAPI-29fdf9ae4a91131f758035ab79fbfe0595ff1eca.tar.bz2
SMAPI-29fdf9ae4a91131f758035ab79fbfe0595ff1eca.zip
rework input handling to allow sending custom input to the game/mods
That will let Virtual Keyboard on Android work with the future multi-key binding API, and with mods that check input state directly (e.g. Pathoschild/StardewMods#520). It might also be useful as a public API in future versions.
Diffstat (limited to 'src/SMAPI/Events/ButtonReleasedEventArgs.cs')
-rw-r--r--src/SMAPI/Events/ButtonReleasedEventArgs.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI/Events/ButtonReleasedEventArgs.cs b/src/SMAPI/Events/ButtonReleasedEventArgs.cs
index f5282230..40ec1cc1 100644
--- a/src/SMAPI/Events/ButtonReleasedEventArgs.cs
+++ b/src/SMAPI/Events/ButtonReleasedEventArgs.cs
@@ -37,17 +37,17 @@ namespace StardewModdingAPI.Events
this.InputState = inputState;
}
- /// <summary>Whether a mod has indicated the key was already handled, so the game should handle it.</summary>
+ /// <summary>Get whether a mod has indicated the key was already handled, so the game shouldn't handle it.</summary>
public bool IsSuppressed()
{
return this.IsSuppressed(this.Button);
}
- /// <summary>Whether a mod has indicated the key was already handled, so the game should handle it.</summary>
+ /// <summary>Get whether a mod has indicated the key was already handled, so the game shouldn't handle it.</summary>
/// <param name="button">The button to check.</param>
public bool IsSuppressed(SButton button)
{
- return this.InputState.SuppressButtons.Contains(button);
+ return this.InputState.IsSuppressed(button);
}
/// <summary>Get whether a given button was pressed or held.</summary>