summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/EventArgsInput.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-02-24 19:56:08 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-09-14 16:59:29 -0400
commitbad2ac2a29b8775be97133e4c4cfb67a4a7406ee (patch)
tree9cc61caa21be489a9eb6b67368e2c40aca17af80 /src/SMAPI/Events/EventArgsInput.cs
parent4a297e29eb0c97be799ee3939e9747dc1c631427 (diff)
downloadSMAPI-bad2ac2a29b8775be97133e4c4cfb67a4a7406ee.tar.gz
SMAPI-bad2ac2a29b8775be97133e4c4cfb67a4a7406ee.tar.bz2
SMAPI-bad2ac2a29b8775be97133e4c4cfb67a4a7406ee.zip
remove deprecated APIs (#606)
Diffstat (limited to 'src/SMAPI/Events/EventArgsInput.cs')
-rw-r--r--src/SMAPI/Events/EventArgsInput.cs64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/SMAPI/Events/EventArgsInput.cs b/src/SMAPI/Events/EventArgsInput.cs
deleted file mode 100644
index 5cff3408..00000000
--- a/src/SMAPI/Events/EventArgsInput.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-#if !SMAPI_3_0_STRICT
-using System;
-using System.Collections.Generic;
-
-namespace StardewModdingAPI.Events
-{
- /// <summary>Event arguments when a button is pressed or released.</summary>
- public class EventArgsInput : EventArgs
- {
- /*********
- ** Fields
- *********/
- /// <summary>The buttons to suppress.</summary>
- private readonly HashSet<SButton> SuppressButtons;
-
-
- /*********
- ** Accessors
- *********/
- /// <summary>The button on the controller, keyboard, or mouse.</summary>
- public SButton Button { get; }
-
- /// <summary>The current cursor position.</summary>
- public ICursorPosition Cursor { get; }
-
- /// <summary>Whether the input should trigger actions on the affected tile.</summary>
- public bool IsActionButton => this.Button.IsActionButton();
-
- /// <summary>Whether the input should use tools on the affected tile.</summary>
- public bool IsUseToolButton => this.Button.IsUseToolButton();
-
- /// <summary>Whether a mod has indicated the key was already handled.</summary>
- public bool IsSuppressed => this.SuppressButtons.Contains(this.Button);
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Construct an instance.</summary>
- /// <param name="button">The button on the controller, keyboard, or mouse.</param>
- /// <param name="cursor">The cursor position.</param>
- /// <param name="suppressButtons">The buttons to suppress.</param>
- public EventArgsInput(SButton button, ICursorPosition cursor, HashSet<SButton> suppressButtons)
- {
- this.Button = button;
- this.Cursor = cursor;
- this.SuppressButtons = suppressButtons;
- }
-
- /// <summary>Prevent the game from handling the current button press. This doesn't prevent other mods from receiving the event.</summary>
- public void SuppressButton()
- {
- this.SuppressButton(this.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>
- public void SuppressButton(SButton button)
- {
- this.SuppressButtons.Add(button);
- }
- }
-}
-#endif