Class: Rubygame::ActiveEvent
Overview
Indicates that the Rubygame window has gained or lost focus from the window manager.
This event has these attributes:
- gain
-
true if the window gained focus, and false if it lost focus.
- state
-
string indicating what type of focus was gained or lost:
- “mouse”
-
the mouse entered/exited the window
- “keyboard”
-
the window gained or lost input focus
- “active”
-
the window was minimized/iconified.
Instance Attribute Summary collapse
-
#gain ⇒ Object
Returns the value of attribute gain.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(gain, state) ⇒ ActiveEvent
constructor
A new instance of ActiveEvent.
Constructor Details
#initialize(gain, state) ⇒ ActiveEvent
Returns a new instance of ActiveEvent.
167 168 169 170 |
# File 'lib/rubygame/event.rb', line 167 def initialize(gain,state) @gain = gain @state = state end |
Instance Attribute Details
#gain ⇒ Object
Returns the value of attribute gain.
166 167 168 |
# File 'lib/rubygame/event.rb', line 166 def gain @gain end |
#state ⇒ Object
Returns the value of attribute state.
166 167 168 |
# File 'lib/rubygame/event.rb', line 166 def state @state end |