TrueCraft/TrueCraft.Client/Input/MouseButtonEventArgs.cs

35 lines
1.1 KiB
C#
Raw Normal View History

2015-06-13 19:17:06 -04:00
using System;
namespace TrueCraft.Client.Input
{
/// <summary>
2015-06-14 11:33:18 -04:00
/// Provides the event data for mouse button events.
2015-06-13 19:17:06 -04:00
/// </summary>
public class MouseButtonEventArgs : MouseEventArgs
{
/// <summary>
2015-06-14 11:33:18 -04:00
/// Gets the mouse button for the event.
2015-06-13 19:17:06 -04:00
/// </summary>
public MouseButton Button { get; private set; }
/// <summary>
2015-06-14 11:33:18 -04:00
/// Gets whether the button was pressed or released.
2015-06-13 19:17:06 -04:00
/// </summary>
public bool IsPressed { get; private set; }
/// <summary>
2015-06-14 11:33:18 -04:00
/// Creates new mouse button event data.
2015-06-13 19:17:06 -04:00
/// </summary>
2015-06-14 11:33:18 -04:00
/// <param name="x">The X coordinate for the event.</param>
/// <param name="y">The Y coordinate for the event.</param>
/// <param name="button">The mouse button for the event.</param>
/// <param name="isPressed">Whether the button was pressed or released.</param>
2015-06-13 19:17:06 -04:00
public MouseButtonEventArgs(int x, int y, MouseButton button, bool isPressed)
: base(x, y)
{
Button = button;
IsPressed = isPressed;
}
}
}