From 929dccb75a1405737975d76648e015a3e7c00177 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 23:07:10 -0400 Subject: reorganise repo structure --- src/SMAPI/Events/EventArgsMouseStateChanged.cs | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/SMAPI/Events/EventArgsMouseStateChanged.cs (limited to 'src/SMAPI/Events/EventArgsMouseStateChanged.cs') diff --git a/src/SMAPI/Events/EventArgsMouseStateChanged.cs b/src/SMAPI/Events/EventArgsMouseStateChanged.cs new file mode 100644 index 00000000..57298164 --- /dev/null +++ b/src/SMAPI/Events/EventArgsMouseStateChanged.cs @@ -0,0 +1,42 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Input; + +namespace StardewModdingAPI.Events +{ + /// Event arguments for a event. + public class EventArgsMouseStateChanged : EventArgs + { + /********* + ** Accessors + *********/ + /// The previous mouse state. + public MouseState PriorState { get; } + + /// The current mouse state. + public MouseState NewState { get; } + + /// The previous mouse position on the screen adjusted for the zoom level. + public Point PriorPosition { get; } + + /// The current mouse position on the screen adjusted for the zoom level. + public Point NewPosition { get; } + + + /********* + ** Public methods + *********/ + /// Construct an instance. + /// The previous mouse state. + /// The current mouse state. + /// The previous mouse position on the screen adjusted for the zoom level. + /// The current mouse position on the screen adjusted for the zoom level. + public EventArgsMouseStateChanged(MouseState priorState, MouseState newState, Point priorPosition, Point newPosition) + { + this.PriorState = priorState; + this.NewState = newState; + this.PriorPosition = priorPosition; + this.NewPosition = newPosition; + } + } +} -- cgit