diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI/Utilities/KeybindList.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/SMAPI/Utilities/KeybindList.cs b/src/SMAPI/Utilities/KeybindList.cs index f6933af3..4ae66ab7 100644 --- a/src/SMAPI/Utilities/KeybindList.cs +++ b/src/SMAPI/Utilities/KeybindList.cs @@ -83,6 +83,15 @@ namespace StardewModdingAPI.Utilities } } + /// <summary>Get a keybind list for a single keybind.</summary> + /// <param name="buttons">The buttons that must be down to activate the keybind.</param> + public static KeybindList ForSingle(params SButton[] buttons) + { + return new KeybindList( + new Keybind(buttons) + ); + } + /// <summary>Get the overall keybind list state relative to the previous tick.</summary> /// <remarks>States are transitive across keybind. For example, if one keybind is 'released' and another is 'pressed', the state of the keybind list is 'held'.</remarks> public SButtonState GetState() |