OpenArena::ControlScheme Class Reference

This class represents a user's control scheme. More...

#include <ctrls.h>

List of all members.

Public Types

 ACTION_FORWARD
 ACTION_BACKWARD
 ACTION_LOOKLEFT
 ACTION_LOOKRIGHT
 ACTION_LOOKUP
 ACTION_LOOKDOWN
 ACTION_MOVELEFT
 ACTION_MOVERIGHT
 ACTION_MOVEUP
 ACTION_MOVEDOWN
 ACTION_ROLLLEFT
 ACTION_ROLLRIGHT
 ACTION_FIREPRIMARY
 ACTION_FIRESECONDARY
 ACTION_WEAPONNEXT
 ACTION_WEAPONPREV
 ACTION_TOGGLE_LIGHTS
 ACTION_TOGGLE_FPS
 ACTION_TOGGLE_CONSOLE
 ACTION_TOGGLE_MOUSELOOK
 ACTION_QUICKMOUSELOOK
enum  Action {
  ACTION_FORWARD, ACTION_BACKWARD, ACTION_LOOKLEFT, ACTION_LOOKRIGHT,
  ACTION_LOOKUP, ACTION_LOOKDOWN, ACTION_MOVELEFT, ACTION_MOVERIGHT,
  ACTION_MOVEUP, ACTION_MOVEDOWN, ACTION_ROLLLEFT, ACTION_ROLLRIGHT,
  ACTION_FIREPRIMARY, ACTION_FIRESECONDARY, ACTION_WEAPONNEXT, ACTION_WEAPONPREV,
  ACTION_TOGGLE_LIGHTS, ACTION_TOGGLE_FPS, ACTION_TOGGLE_CONSOLE, ACTION_TOGGLE_MOUSELOOK,
  ACTION_QUICKMOUSELOOK
}

Public Member Functions

void LoadDefaultControlScheme ()
 This method loads a hard coded default control scheme.
void ClearControlScheme ()
 This method clears this control scheme so that no keys are bound to any actions.
void Unbind (uint8)
 This method removes a key from all actions.
bool Bind (uint32, uint8)
 This method binds a key to an action.

Public Attributes

list< uint8 > forward
list< uint8 > backward
list< uint8 > lookLeft
list< uint8 > lookRight
list< uint8 > lookUp
list< uint8 > lookDown
list< uint8 > moveLeft
list< uint8 > moveRight
list< uint8 > moveUp
list< uint8 > moveDown
list< uint8 > firePrimary
list< uint8 > fireSecondary
list< uint8 > weaponNext
list< uint8 > weaponPrev
list< uint8 > toggleLights
list< uint8 > toggleFPS
list< uint8 > toggleConsole
list< uint8 > toggleMouseLook
list< uint8 > quickMouseLook
list< uint8 > rollLeft
list< uint8 > rollRight


Detailed Description

This class represents a user's control scheme.

This class manages a set of actions and their associated keys.

Remarks:
This could become a set of keys with associated actions.
See also:


Member Enumeration Documentation

enum OpenArena::ControlScheme::Action

Enumerator:
ACTION_FORWARD 
ACTION_BACKWARD 
ACTION_LOOKLEFT 
ACTION_LOOKRIGHT 
ACTION_LOOKUP 
ACTION_LOOKDOWN 
ACTION_MOVELEFT 
ACTION_MOVERIGHT 
ACTION_MOVEUP 
ACTION_MOVEDOWN 
ACTION_ROLLLEFT 
ACTION_ROLLRIGHT 
ACTION_FIREPRIMARY 
ACTION_FIRESECONDARY 
ACTION_WEAPONNEXT 
ACTION_WEAPONPREV 
ACTION_TOGGLE_LIGHTS 
ACTION_TOGGLE_FPS 
ACTION_TOGGLE_CONSOLE 
ACTION_TOGGLE_MOUSELOOK 
ACTION_QUICKMOUSELOOK 


Member Function Documentation

bool OpenArena::ControlScheme::Bind ( uint32  ,
uint8   
)

This method binds a key to an action.

Parameters:
The ACTION_* constant for the action to bind to.
The KEY_* constant for the key to bind.
Returns:
Returns false if an invalid action is specified and true otherwise.
Remarks:
This unbinds the key before binding it to the new action.
See also:

void OpenArena::ControlScheme::ClearControlScheme (  ) 

This method clears this control scheme so that no keys are bound to any actions.

Remarks:
See also:

void OpenArena::ControlScheme::LoadDefaultControlScheme (  ) 

This method loads a hard coded default control scheme.

Remarks:
See also:

void OpenArena::ControlScheme::Unbind ( uint8   ) 

This method removes a key from all actions.

Parameters:
The KEY_* constant for the key to unbind.
Remarks:
See also:


Member Data Documentation

list<uint8> OpenArena::ControlScheme::backward

list<uint8> OpenArena::ControlScheme::firePrimary

list<uint8> OpenArena::ControlScheme::fireSecondary

list<uint8> OpenArena::ControlScheme::forward

list<uint8> OpenArena::ControlScheme::lookDown

list<uint8> OpenArena::ControlScheme::lookLeft

list<uint8> OpenArena::ControlScheme::lookRight

list<uint8> OpenArena::ControlScheme::lookUp

list<uint8> OpenArena::ControlScheme::moveDown

list<uint8> OpenArena::ControlScheme::moveLeft

list<uint8> OpenArena::ControlScheme::moveRight

list<uint8> OpenArena::ControlScheme::moveUp

list<uint8> OpenArena::ControlScheme::quickMouseLook

list<uint8> OpenArena::ControlScheme::rollLeft

list<uint8> OpenArena::ControlScheme::rollRight

list<uint8> OpenArena::ControlScheme::toggleConsole

list<uint8> OpenArena::ControlScheme::toggleFPS

list<uint8> OpenArena::ControlScheme::toggleLights

list<uint8> OpenArena::ControlScheme::toggleMouseLook

list<uint8> OpenArena::ControlScheme::weaponNext

list<uint8> OpenArena::ControlScheme::weaponPrev


The documentation for this class was generated from the following files:
Generated on Tue Jul 11 00:17:53 2006 for OpenArena by  doxygen 1.4.7