Module: SDC::EventMouse

Defined in:
engine_docs/automatic_doc_EventMouse.rb

Overview

Module for different mouse button press values

Constant Summary collapse

Left =
0
Right =
1
Middle =
2
XButton1 =
3
XButton2 =
4
VerticalWheel =
5
HorizontalWheel =
6

Class Method Summary collapse

Class Method Details

.get_coordinates(window) ⇒ Coordinates

Gets the coordinates of the mouse, relative to the given window

Parameters:

Returns:



# File 'engine_docs/automatic_doc_EventMouse.rb', line 11

.get_position(window = nil) ⇒ Array<Integer>

Gets the pixel position of the mouse, either absolute or relative to a given window

Parameters:

  • window (Window|nil) (defaults to: nil)

Returns:

  • (Array<Integer>)


# File 'engine_docs/automatic_doc_EventMouse.rb', line 5

.is_button_pressed?(button_value) ⇒ Boolean

Checks whether the mouse button with the given value is pressed

Parameters:

  • button_value (Integer)

Returns:

  • (Boolean)

See Also:



# File 'engine_docs/automatic_doc_EventMouse.rb', line 17

.set_position(position, window = nil) ⇒ nil

Sets the pixel position of the mouse, either absolute or relative to a given window

Parameters:

  • position (Array<Integer>)
  • window (Window|nil) (defaults to: nil)

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_EventMouse.rb', line 24