summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/EventArgsKeyPressed.cs
blob: 82a593bec2426967f93b5a3c0afcf0597297bc02 (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
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; private set; }


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