Class: Moon::MouseInputEvent

Inherits:
InputEvent show all
Includes:
MouseEvent
Defined in:
lib/moon/packages/std/event.rb

Instance Attribute Summary collapse

Attributes inherited from InputEvent

#key, #mods

Attributes inherited from Event

#id, #type

Instance Method Summary collapse

Methods inherited from InputEvent

#alt?, #control?, #shift?, #super?

Methods inherited from Event

make_filter

Constructor Details

#initialize(button, action, mods, position) ⇒ MouseInputEvent

Returns a new instance of MouseInputEvent.


116
117
118
119
120
# File 'lib/moon/packages/std/event.rb', line 116

def initialize(button, action, mods, position)
  @position = Vector2[position]
  @relative = Vector2[position]
  super button, action, mods
end

Instance Attribute Details

#actionObject

Returns the value of attribute action


112
113
114
# File 'lib/moon/packages/std/event.rb', line 112

def action
  @action
end

#positionObject

Returns the value of attribute position


113
114
115
# File 'lib/moon/packages/std/event.rb', line 113

def position
  @position
end

#relativeObject

Returns the value of attribute relative


114
115
116
# File 'lib/moon/packages/std/event.rb', line 114

def relative
  @relative
end