Class: Rubydraw::Events::FocusGain
- Inherits:
-
FocusEvent
- Object
- Event
- FocusEvent
- Rubydraw::Events::FocusGain
- Defined in:
- lib/rubydraw/events.rb
Overview
Created when the window gains focus.
Class Method Summary collapse
-
.matches?(sdl_event) ⇒ Boolean
Redefine Event#matches? because both this class and Rubydraw::Events::FocusLoss use SDL::ActiveEvent.
- .wants_to_match? ⇒ Boolean
Methods inherited from FocusEvent
Methods inherited from Event
#event?, from_sdl_event, matching_sdl_type
Class Method Details
.matches?(sdl_event) ⇒ Boolean
Redefine Event#matches? because both this class and Rubydraw::Events::FocusLoss use SDL::ActiveEvent.
216 217 218 219 220 221 222 |
# File 'lib/rubydraw/events.rb', line 216 def self.matches?(sdl_event) result = false if super(sdl_event) result = sdl_event.gain == 1 end result end |
.wants_to_match? ⇒ Boolean
210 211 212 |
# File 'lib/rubydraw/events.rb', line 210 def self.wants_to_match? true end |