diff options
Diffstat (limited to 'src/SMAPI/Events/EventArgsKeyboardStateChanged.cs')
-rw-r--r-- | src/SMAPI/Events/EventArgsKeyboardStateChanged.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs b/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs new file mode 100644 index 00000000..14e397ce --- /dev/null +++ b/src/SMAPI/Events/EventArgsKeyboardStateChanged.cs @@ -0,0 +1,31 @@ +using System; +using Microsoft.Xna.Framework.Input; + +namespace StardewModdingAPI.Events +{ + /// <summary>Event arguments for a <see cref="ControlEvents.KeyboardChanged"/> event.</summary> + public class EventArgsKeyboardStateChanged : EventArgs + { + /********* + ** Accessors + *********/ + /// <summary>The previous keyboard state.</summary> + public KeyboardState NewState { get; } + + /// <summary>The current keyboard state.</summary> + public KeyboardState PriorState { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="priorState">The previous keyboard state.</param> + /// <param name="newState">The current keyboard state.</param> + public EventArgsKeyboardStateChanged(KeyboardState priorState, KeyboardState newState) + { + this.PriorState = priorState; + this.NewState = newState; + } + } +} |