aboutsummaryrefslogtreecommitdiff
path: root/V3/Input/IMouseEvent.cs
diff options
context:
space:
mode:
Diffstat (limited to 'V3/Input/IMouseEvent.cs')
-rw-r--r--V3/Input/IMouseEvent.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/V3/Input/IMouseEvent.cs b/V3/Input/IMouseEvent.cs
new file mode 100644
index 0000000..37b221d
--- /dev/null
+++ b/V3/Input/IMouseEvent.cs
@@ -0,0 +1,34 @@
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Input;
+
+namespace V3.Input
+{
+ /// <summary>
+ /// An event that is sent when a mouse button is pressed or released.
+ /// </summary>
+ public interface IMouseEvent
+ {
+ /// <summary>
+ /// The mouse button that was pressed or released.
+ /// </summary>
+ MouseButton MouseButton { get; }
+ /// <summary>
+ /// The state of the mouse button (pressed or released?).
+ /// </summary>
+ ButtonState ButtonState { get; }
+ /// <summary>
+ /// The position where the mouse button was pressed the last time.
+ /// </summary>
+ Point PositionPressed { get; }
+ /// <summary>
+ /// The position where the mouse button was released if this is a
+ /// release event, null otherwise.
+ /// </summary>
+ Point? PositionReleased { get; }
+ /// <summary>
+ /// True if PositionReleased is a valid on-screen position, otherwise
+ /// false.
+ /// </summary>
+ bool ReleasedOnScreen { get; }
+ }
+}