Class: Rubygame::ResizeEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/rubygame/event.rb,
ext/rubygame/rubygame_event.c

Overview

Indicates that the application window was resized. (After this event occurs, you should use Screen#set_mode to change the display surface to the new size.)

This event has these attributes:

size

the new size of the window, in pixels [w,h].

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(new_size) ⇒ ResizeEvent

Returns a new instance of ResizeEvent.



298
299
300
# File 'lib/rubygame/event.rb', line 298

def initialize(new_size)
	@size = new_size
end

Instance Attribute Details

#sizeObject

Returns the value of attribute size.



297
298
299
# File 'lib/rubygame/event.rb', line 297

def size
  @size
end