Class: Rubygame::ResizeEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/rubygame/event.rb

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.



406
407
408
# File 'lib/rubygame/event.rb', line 406

def initialize(new_size)
	@size = new_size
end

Instance Attribute Details

#sizeObject

Returns the value of attribute size.



405
406
407
# File 'lib/rubygame/event.rb', line 405

def size
  @size
end