MouseHandler - LiruJ/GuiCookie GitHub Wiki
A MouseHandler component handles the mouse clicking and hovering over the element. This is mostly used to create buttons and other interactable elements.
Sets the ClickType of the MouseHandler between these two values:
- OnMouseDown. The click events are invoked on the mouse button down.
- OnMouseUp. The click events are invoked on the mouse button up, as long as the mouse is still hovered over the element.
Gets the absolute position of the mouse.
Gets the position of the mouse relative to the MouseHandler's element.
Is true if the mouse was clicked on the element and is being held down, regardless of mouse position.
Is true if the mouse is over the element and the left click button is pressed. This is true for every frame that the mouse is over the element and clicked.
Is true if the mouse is over the element and the right click button is pressed. This is true for every frame that the mouse is over the element and clicked.
The type of click detection to use.
Is fired when the mouse enters the element's bounds.
Is fired when the mouse leaves the element's bounds.
Is fired when the mouse is over the element and the left click button is released/pressed depending on the ClickType.
Is fired when the mouse is over the element and the right click button is released/pressed depending on the ClickType.