summaryrefslogtreecommitdiff
path: root/src/SMAPI/IInputHelper.cs
blob: 328f504bb55aec1557439884d7d3743c17bbef03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace StardewModdingAPI
{
    /// <summary>Provides an API for checking and changing input state.</summary>
    public interface IInputHelper : IModLinked
    {
        /// <summary>Get the current cursor position.</summary>
        ICursorPosition GetCursorPosition();

        /// <summary>Get whether a button is currently pressed.</summary>
        /// <param name="button">The button.</param>
        bool IsDown(SButton button);

        /// <summary>Get whether a button is currently suppressed, so the game won't see it.</summary>
        /// <param name="button">The button.</param>
        bool IsSuppressed(SButton button);

        /// <summary>Prevent the game from handling a button press. This doesn't prevent other mods from receiving the event.</summary>
        /// <param name="button">The button to suppress.</param>
        void Suppress(SButton button);
    }
}