struct Espresso::Mouse
- Espresso::Mouse
- Struct
- Value
- Object
Overview
Information about the mouse that is associated with a window.
Each Window
has its own mouse instance with properties specific to that window.
To retrieve a mouse instance, use Window#mouse
.
Included Modules
- Espresso::ErrorHandling
- Espresso::WindowTopic
Extended Modules
- Espresso::ErrorHandling
Defined in:
lib/espresso/src/espresso/input/mouse.crlib/espresso/src/espresso/input/mouse/events.cr
patches/mouse.cr
Instance Method Summary
-
#button(button : MouseButton) : ButtonState
Returns the last state reported for the specified mouse button to the window.
Instance Method Detail
def button(button : MouseButton) : ButtonState
#
Returns the last state reported for the specified mouse button to the window.
The returned state is one of the values from ButtonState
.
If the #sticky?
input mode is enabled,
this method returns ButtonState::Pressed
the first time you call it
for a mouse button that was pressed,
even if that mouse button has already been released.