Class: Rubydraw::Events::WindowResize
- Defined in:
- lib/rubydraw/events.rb
Overview
Created when the user resizes the window. This can only happen if Rubydraw::Flags::Resizable is passed when the window is created.
Instance Attribute Summary collapse
-
#dimensions ⇒ Object
Returns the value of attribute dimensions.
Class Method Summary collapse
Instance Method Summary collapse
- #height ⇒ Object (also: #y)
-
#initialize(dimensions) ⇒ WindowResize
constructor
A new instance of WindowResize.
- #width ⇒ Object (also: #x)
Methods inherited from Event
#event?, matches?, wants_to_match?
Constructor Details
#initialize(dimensions) ⇒ WindowResize
Returns a new instance of WindowResize.
271 272 273 |
# File 'lib/rubydraw/events.rb', line 271 def initialize(dimensions) @dimensions = dimensions end |
Instance Attribute Details
#dimensions ⇒ Object
Returns the value of attribute dimensions.
269 270 271 |
# File 'lib/rubydraw/events.rb', line 269 def dimensions @dimensions end |
Class Method Details
.from_sdl_event(sdl_event) ⇒ Object
265 266 267 |
# File 'lib/rubydraw/events.rb', line 265 def self.from_sdl_event(sdl_event) self.new(Point[sdl_event.w, sdl_event.h]) end |
.matching_sdl_type ⇒ Object
261 262 263 |
# File 'lib/rubydraw/events.rb', line 261 def self.matching_sdl_type SDL::VIDEORESIZE end |