Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Using GBInput

The gbinput::Server manages keyboard and mouse input by registering gbinput::State's and gbinput::Action's.

Setup

Call gbinput::Server::Init() to initialize the server singleton. For each loop call the server's Update() to check the state of the registered input handlers. This will also update the server for input querying. Call Destroy() to shutdown the server.

Handling Input

Input handlers are created by first deriving from gbinput::State. The state is a set of input commands such as keyboard presses or mouse movement. A state is coupled to gbinput::Action. Upon calling a state's Update(), it will evaluate it's Action.

Details

gbinput uses DirectX 8.1 for acquiring the keyboard and mouse. If the application loses focus, the server's Acquire() should be called.


Generated on Mon Sep 2 14:52:32 2002 for GunBuster Engine by doxygen1.2.17