diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-01 18:16:09 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-01 18:16:09 -0400 |
commit | c8ad50dad1d706a1901798f9396f6becfea36c0e (patch) | |
tree | 28bd818a5db39ec5ece1bd141a28de955950463b /src/SMAPI/Framework/Input/KeyboardStateBuilder.cs | |
parent | 451b70953ff4c0b1b27ae0de203ad99379b45b2a (diff) | |
parent | f78093bdb58d477b400cde3f19b70ffd6ddf833d (diff) | |
download | SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.gz SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.bz2 SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Input/KeyboardStateBuilder.cs')
-rw-r--r-- | src/SMAPI/Framework/Input/KeyboardStateBuilder.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs b/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs index 620ad442..f66fbd07 100644 --- a/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs +++ b/src/SMAPI/Framework/Input/KeyboardStateBuilder.cs @@ -14,7 +14,7 @@ namespace StardewModdingAPI.Framework.Input private KeyboardState? State; /// <summary>The pressed buttons.</summary> - private readonly HashSet<Keys> PressedButtons = new HashSet<Keys>(); + private readonly HashSet<Keys> PressedButtons = new(); /********* @@ -27,12 +27,11 @@ namespace StardewModdingAPI.Framework.Input this.State = state; this.PressedButtons.Clear(); - foreach (var button in state.GetPressedKeys()) + foreach (Keys button in state.GetPressedKeys()) this.PressedButtons.Add(button); } - /// <summary>Override the states for a set of buttons.</summary> - /// <param name="overrides">The button state overrides.</param> + /// <inheritdoc /> public KeyboardStateBuilder OverrideButtons(IDictionary<SButton, SButtonState> overrides) { foreach (var pair in overrides) @@ -51,14 +50,14 @@ namespace StardewModdingAPI.Framework.Input return this; } - /// <summary>Get the currently pressed buttons.</summary> + /// <inheritdoc /> public IEnumerable<SButton> GetPressedButtons() { foreach (Keys key in this.PressedButtons) yield return key.ToSButton(); } - /// <summary>Get the equivalent state.</summary> + /// <inheritdoc /> public KeyboardState GetState() { return |