Class: Rubydraw::Events::MouseReleased
- Defined in:
- lib/rubydraw/events.rb
Overview
Created when a mouse button is released. Note: this event is used for any mouse button.
Instance Attribute Summary collapse
-
#button ⇒ Object
readonly
Returns the value of attribute button.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(position, button) ⇒ MouseReleased
constructor
Creates a new MouseReleased event, specifying where (the position) it happened and what button was released.
Methods inherited from Event
#event?, matches?, wants_to_match?
Constructor Details
#initialize(position, button) ⇒ MouseReleased
Creates a new MouseReleased event, specifying where (the position) it happened and what button was released.
177 178 179 |
# File 'lib/rubydraw/events.rb', line 177 def initialize(position, ) @position, = position, end |
Instance Attribute Details
#button ⇒ Object (readonly)
Returns the value of attribute button.
173 174 175 |
# File 'lib/rubydraw/events.rb', line 173 def end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
173 174 175 |
# File 'lib/rubydraw/events.rb', line 173 def position @position end |
Class Method Details
.from_sdl_event(sdl_event) ⇒ Object
165 166 167 |
# File 'lib/rubydraw/events.rb', line 165 def self.from_sdl_event(sdl_event) self.new(Point[sdl_event.x, sdl_event.y], sdl_event.) end |
.matching_sdl_type ⇒ Object
169 170 171 |
# File 'lib/rubydraw/events.rb', line 169 def self.matching_sdl_type SDL::MOUSEBUTTONUP end |