summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/EventArgsKeyPressed.cs
blob: 6204d8218eb0a08e9bf4a336a4921509c1915321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#if !SMAPI_3_0_STRICT
using System;
using Microsoft.Xna.Framework.Input;

namespace StardewModdingAPI.Events
{
    /// <summary>Event arguments for a <see cref="ControlEvents.KeyboardChanged"/> event.</summary>
    public class EventArgsKeyPressed : EventArgs
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The keyboard button that was pressed.</summary>
        public Keys KeyPressed { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="key">The keyboard button that was pressed.</param>
        public EventArgsKeyPressed(Keys key)
        {
            this.KeyPressed = key;
        }
    }
}
#endif