struct Espresso::Mouse

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

Extended Modules

Defined in:

lib/espresso/src/espresso/input/mouse.cr
lib/espresso/src/espresso/input/mouse/events.cr
patches/mouse.cr

Instance Method Summary

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.


[View source]