struct

Lime::Modules::Mouse::Event

Inherits Struct < Value < Object

A mouse event.

Constructors

new(x : Int32, y : Int32, type : Symbol)
Source

Instance methods

clone
Source
copy_with(x _x = @x, y _y = @y, type _type = @type)
Source
kind

Returns the kind of mouse event based on type:

  • :release if a mouse button has been released.
  • :click if a mouse button has been pressed.
  • :wheel if the wheel has been scrolled.
  • :drag if mode is Mode::Drag or Mode::All and a mouse button has been pressed and the mouse has been moved.
  • :move if mode is Mode::All and the mouse has been moved.
Source
type

Returns the type of mouse event:

  • :release if a mouse button has been released.

  • :left if the left mouse button has been pressed.

  • :wheel if the mouse wheel button has been pressed.

  • :right if the right mouse button has been pressed.

  • :wheel_up if the mouse wheel has been scrolled up.

  • :wheel_down if the mouse wheel has been scrolled down.

Only if mode is Mode::Drag or Mode::All:

  • :left_drag if the left mouse button has been pressed and the mouse has been moved.
  • :wheel_drag if the mouse wheel button has been pressed and the mouse has been moved.
  • :right_drag if the right mouse button has been pressed and the mouse has been moved.

Only if mode is Mode::All:

  • :move if the mouse has been moved.
Source
x
y