Planeshift
Classes | Public Member Functions

eControlManager Class Reference

#include <econtrolmanager.h>

List of all members.

Classes

struct  ActionKeyMap
 Holds the map between a key and its action.

Public Member Functions

void ClearKeyMap ()
 Removes all current key mappings.
 CMD_DECLARATION (HandleLookDown)
 CMD_DECLARATION (HandleRotateLeft)
 CMD_DECLARATION (HandleRotateRight)
 CMD_DECLARATION (HandleLookUp)
 CMD_DECLARATION (HandleBackward)
 CMD_DECLARATION (HandleForward)
 eControlManager (iObjectRegistry *object_reg)
 Initialise the eControlManager with an object registry.
bool HandleEvent (iEvent &event)
 Handles the given even if it is a key even.
bool LoadKeyMap (const char *filename)
 Imports key mappings from the given files.
 ~eControlManager ()

Detailed Description

Definition at line 33 of file econtrolmanager.h.


Constructor & Destructor Documentation

eControlManager::eControlManager ( iObjectRegistry *  object_reg)

Initialise the eControlManager with an object registry.

The object registry will be searched for the keymap files and etc.

eControlManager::~eControlManager ( )

Member Function Documentation

void eControlManager::ClearKeyMap ( )

Removes all current key mappings.

eControlManager::CMD_DECLARATION ( HandleLookDown  )
eControlManager::CMD_DECLARATION ( HandleForward  )
eControlManager::CMD_DECLARATION ( HandleRotateRight  )
eControlManager::CMD_DECLARATION ( HandleLookUp  )
eControlManager::CMD_DECLARATION ( HandleBackward  )
eControlManager::CMD_DECLARATION ( HandleRotateLeft  )
bool eControlManager::HandleEvent ( iEvent &  event)

Handles the given even if it is a key even.

Parameters:
eventThe event to handle.
Returns:
True if the event has been handled, false otherwise.
bool eControlManager::LoadKeyMap ( const char *  filename)

Imports key mappings from the given files.

Note:
Note that this adds to the current mappings.
Parameters:
filenameName of the file with the mappings to import.
Returns:
Returns true upon successfully loading the file, false otherwises.

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