Class: RAGE::InputHandlers::CommonOpenGlInputHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/rage/input.rb

Overview

Input handler providing common opengl related operations, including

  • ‘W’ key toggles wireframe mode on / off

Class Method Summary collapse

Class Method Details

.handle(event) ⇒ Object



60
61
62
63
64
65
66
67
68
# File 'lib/rage/input.rb', line 60

def self.handle(event)
   case event
   when SDL::Event2::KeyDown
      case event.sym
      when SDL::Key::W
        Game.wireframe_mode= !Game.wireframe_mode
      end
   end
end