Nimbus  0.2
A game... with arrows... which should be clouds
 All Classes Functions Variables Enumerations Enumerator
Nimbus::InputManager Class Reference

#include <InputManager.h>

Inheritance diagram for Nimbus::InputManager:
Collaboration diagram for Nimbus::InputManager:

Public Member Functions

 InputManager (void)
 
virtual void initialize (void)
 
virtual bool update (void)
 
virtual void pause (void)
 
virtual void stop (void)
 

Protected Member Functions

virtual void windowResized (Ogre::RenderWindow *rw)
 
virtual void windowClosed (Ogre::RenderWindow *rw)
 
virtual bool keyPressed (const OIS::KeyEvent &evt)
 
virtual bool keyReleased (const OIS::KeyEvent &evt)
 
virtual bool mouseMoved (const OIS::MouseEvent &evt)
 
virtual bool mousePressed (const OIS::MouseEvent &evt, OIS::MouseButtonID id)
 
virtual bool mouseReleased (const OIS::MouseEvent &evt, OIS::MouseButtonID id)
 

Detailed Description

Manager to bind input to events in the game.

Events should be passed through the event callback system so that in game activities are not associated directly to keys, but rather to generic event calls created by key presses.

The input manager uses buffered input because buffered input is better than polled input. This of course is not true, but for some reason, callbacks seem cleaner. So we'll use them if possible. If polling is necessary, we have an update function. At the moment, this only does generic input checks, and this is probably for the best.

Currently, the input manager is a single monolithic class for handling game input. As a design decision, input managers could be made specific to each RunMode. That way input in a menu would be handled differently than in the game.

The other possibility is to simply send off events regardless of the mode. Since no listeners would be registered, the only adverse effect would be a few (< 5?) extra function calls per input action caught.

Constructor & Destructor Documentation

InputManager::InputManager ( void  )

Constructs the input manager.

Here is the call graph for this function:

Member Function Documentation

virtual void Nimbus::InputManager::initialize ( void  )
inlinevirtual

The initial initialization function.

Implements Nimbus::Manager.

bool InputManager::update ( void  )
virtual

The super complex update function.

Returns
A boolean indicating the success of the update function. If this returns false... stop the program.

Implements Nimbus::Manager.


The documentation for this class was generated from the following files: