From 29fdf9ae4a91131f758035ab79fbfe0595ff1eca Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 8 Mar 2020 11:45:55 -0400 Subject: 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. --- src/SMAPI/Events/ButtonPressedEventArgs.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SMAPI/Events/ButtonPressedEventArgs.cs') diff --git a/src/SMAPI/Events/ButtonPressedEventArgs.cs b/src/SMAPI/Events/ButtonPressedEventArgs.cs index 5d922666..1b30fd23 100644 --- a/src/SMAPI/Events/ButtonPressedEventArgs.cs +++ b/src/SMAPI/Events/ButtonPressedEventArgs.cs @@ -37,17 +37,17 @@ namespace StardewModdingAPI.Events this.InputState = inputState; } - /// Whether a mod has indicated the key was already handled, so the game should handle it. + /// Get whether a mod has indicated the key was already handled, so the game shouldn't handle it. public bool IsSuppressed() { return this.IsSuppressed(this.Button); } - /// Whether a mod has indicated the key was already handled, so the game should handle it. + /// Get whether a mod has indicated the key was already handled, so the game shouldn't handle it. /// The button to check. public bool IsSuppressed(SButton button) { - return this.InputState.SuppressButtons.Contains(button); + return this.InputState.IsSuppressed(button); } /// Get whether a given button was pressed or held. -- cgit