From 902814d308289f169750a615ae573edc348893d3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 22 Apr 2018 15:05:08 -0400 Subject: don't send chatbox input to mods (#453) --- src/SMAPI/Framework/Input/InputState.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/SMAPI/Framework/Input/InputState.cs') diff --git a/src/SMAPI/Framework/Input/InputState.cs b/src/SMAPI/Framework/Input/InputState.cs index 8b0108ae..7c8676e9 100644 --- a/src/SMAPI/Framework/Input/InputState.cs +++ b/src/SMAPI/Framework/Input/InputState.cs @@ -72,6 +72,13 @@ namespace StardewModdingAPI.Framework.Input return this.GetStatus(button).IsDown(); } + /// Get whether any of the given buttons were pressed or held. + /// The buttons to check. + public bool IsAnyDown(InputButton[] buttons) + { + return buttons.Any(button => this.IsDown(button.ToSButton())); + } + /// Get the current input state. /// The previous input state. public static InputState GetState(InputState previousState) -- cgit