From d61bb78b2add425eb385931d36ab4b54e115d870 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 21 Mar 2021 15:18:30 -0400 Subject: simplify creating keybind list for single key --- src/SMAPI/Utilities/KeybindList.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/SMAPI/Utilities/KeybindList.cs b/src/SMAPI/Utilities/KeybindList.cs index 1845285a..28cae240 100644 --- a/src/SMAPI/Utilities/KeybindList.cs +++ b/src/SMAPI/Utilities/KeybindList.cs @@ -30,6 +30,11 @@ namespace StardewModdingAPI.Utilities this.IsBound = this.Keybinds.Any(); } + /// Construct an instance. + /// A single-key binding. + public KeybindList(SButton singleKey) + : this(new Keybind(singleKey)) { } + /// Parse a keybind list from a string, and throw an exception if it's not valid. /// The keybind string. See remarks on for format details. /// The format is invalid. -- cgit