Skip to content

Mouse class reference

Alan Stagner edited this page Jun 9, 2020 · 1 revision

Methods

Int2 GetMousePosition() - Get the mouse coordinates relative to the top left corner of the window


Int2 GetScrollDelta() - Get the scroll wheel relative movement on the last frame


bool GetButton(MouseButton button) - Gets whether the given mouse button is pressed


bool GetButtonDown(MouseButton button) - Gets whether the given mouse button was just pressed this frame


bool GetButtonUp(MouseButton button - Gets whether the given mouse button was just released this frame

Properties

MouseState CurrentState { get; } - Gets a snapshot of the current mouse state


Event<MouseButtonPressedHandler> OnMouseButtonPressed - Event triggered when a mouse button is pressed


Event<MouseButtonReleasedHandler> OnMouseButtonReleased - Event triggered when a mouse button is released