Class: Cura::Event::Mouse

Inherits:
Base
  • Object
show all
Defined in:
lib/cura/event/mouse.rb

Overview

Dispatched when a mouse’s button state changes.

Direct Known Subclasses

MouseButton, MouseWheelDown, MouseWheelUp

Instance Attribute Summary collapse

Attributes inherited from Base

#created_at, #target

Method Summary

Methods inherited from Base

#==, #dispatch, inherited, #initialize, name, #to_h

Methods included from Attributes::HasAttributes

included, #initialize, #update_attributes

Methods included from Attributes::HasInitialize

#initialize

Constructor Details

This class inherits a constructor from Cura::Event::Base

Instance Attribute Details

#xInteger

Get the X coordinate where the mouse button was pressed.

Returns:

  • (Integer)


10
11
12
# File 'lib/cura/event/mouse.rb', line 10

def x
  @x
end

#yInteger

Get the Y coordinate where the mouse button was pressed.

Returns:

  • (Integer)


15
16
17
# File 'lib/cura/event/mouse.rb', line 15

def y
  @y
end