Class: Rubydraw::Events::FocusLoss

Inherits:
FocusEvent show all
Defined in:
lib/rubydraw/events.rb

Overview

Created when the window loses focus.

Class Method Summary collapse

Methods inherited from FocusEvent

matching_sdl_type, wants_to_match?

Methods inherited from Event

#event?, from_sdl_event, matching_sdl_type, wants_to_match?

Class Method Details

.matches?(sdl_event) ⇒ Boolean

Redefine Event#matches? because both this class and Rubydraw::Events::FocuGain use SDL::ActiveEvent

Returns:

  • (Boolean)


243
244
245
246
247
248
# File 'lib/rubydraw/events.rb', line 243

def self.matches?(sdl_event)
  if super(sdl_event)
    return sdl_event.gain == 0
  end
  return false
end