using System; using StardewModdingAPI.Events; namespace StardewModdingAPI.Framework.Events { /// Events raised when the player provides input using a controller, keyboard, or mouse. internal class ModInputEvents : ModEventsBase, IInputEvents { /********* ** Accessors *********/ /// Raised after the player presses a button on the keyboard, controller, or mouse. public event EventHandler ButtonPressed { add => this.EventManager.Input_ButtonPressed.Add(value); remove => this.EventManager.Input_ButtonPressed.Remove(value); } /// Raised after the player releases a button on the keyboard, controller, or mouse. public event EventHandler ButtonReleased { add => this.EventManager.Input_ButtonReleased.Add(value); remove => this.EventManager.Input_ButtonReleased.Remove(value); } /// Raised after the player moves the in-game cursor. public event EventHandler CursorMoved { add => this.EventManager.Input_CursorMoved.Add(value); remove => this.EventManager.Input_CursorMoved.Remove(value); } /// Raised after the player scrolls the mouse wheel. public event EventHandler MouseWheelScrolled { add => this.EventManager.Input_MouseWheelScrolled.Add(value); remove => this.EventManager.Input_MouseWheelScrolled.Remove(value); } /********* ** Public methods *********/ /// Construct an instance. /// The mod which uses this instance. /// The underlying event manager. internal ModInputEvents(IModMetadata mod, EventManager eventManager) : base(mod, eventManager) { } } }