Class: Rubydraw::Events::MouseButtonEvent
- Defined in:
- lib/rubydraw/events.rb
Overview
Provides methods used in Rubydraw::Events::MousePressed and Rubydraw::Events::MouseReleased. No instances of this class should be created, but instances of subclasses are find.
Instance Attribute Summary collapse
-
#button ⇒ Object
readonly
Returns the value of attribute button.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
- #from_sdl_event(sdl_event) ⇒ Object
-
#initialize(position, button) ⇒ MouseButtonEvent
constructor
A new instance of MouseButtonEvent.
Constructor Details
#initialize(position, button) ⇒ MouseButtonEvent
Returns a new instance of MouseButtonEvent.
137 138 139 |
# File 'lib/rubydraw/events.rb', line 137 def initialize(position, ) @position, @button = position, end |
Instance Attribute Details
#button ⇒ Object (readonly)
Returns the value of attribute button.
135 136 137 |
# File 'lib/rubydraw/events.rb', line 135 def @button end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
135 136 137 |
# File 'lib/rubydraw/events.rb', line 135 def position @position end |