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.ButtonPressed.Add(value); remove => this.EventManager.ButtonPressed.Remove(value); } /// Raised after the player releases a button on the keyboard, controller, or mouse. public event EventHandler ButtonReleased { add => this.EventManager.ButtonReleased.Add(value); remove => this.EventManager.ButtonReleased.Remove(value); } /// Raised after the player moves the in-game cursor. public event EventHandler CursorMoved { add => this.EventManager.CursorMoved.Add(value); remove => this.EventManager.CursorMoved.Remove(value); } /// Raised after the player scrolls the mouse wheel. public event EventHandler MouseWheelScrolled { add => this.EventManager.MouseWheelScrolled.Add(value); remove => this.EventManager.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) { } } }