Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

psCharController Class Reference

Manages all control and movement related activities. More...

#include <pscharcontrol.h>

List of all members.

Public Member Functions

void CancelMouseLook ()
void CenterMouse (bool value)
const psControlGetMappedTrigger (psControl::Device device, uint button, uint32 mods)
 Get the triger mapped to a button, or NULL if none.
psMovementManagerGetMovementManager ()
 Provides access to the movement system.
const psControlGetTrigger (const char *name)
 Get a trigger by name.
bool HandleEvent (iEvent &event)
 Takes an event from psEngine, and dispatch it to either psControlManager or psMovementManager.
bool Initialize ()
bool IsReady ()
void LoadDefaultKeys ()
 Resets key mappings to defaults.
void LoadKeyFile ()
 loads the character-specific custom key mappings
bool MatchTrigger (const char *name, psControl::Device device, uint button, uint32 mods)
 Returns true if the trigger exists and is mapped to the specified combo.
 psCharController (iEventNameRegistry *eventname_reg)
bool RemapTrigger (const char *name, psControl::Device device, uint button, uint32 mods)
 Changes the button set for a trigger. Returns false if does not exist or button is taken.
 ~psCharController ()

Protected Member Functions

void CreateKeys ()
 Create all triggers.
bool LoadKeys (const char *file)
 Load all trigger mappings from file.
void SaveKeys ()
 Save custom trigger mappings.

Protected Attributes

psControlManager controls
 Key mappings.
csEventID event_mouseclick
psTriggerHandler handler
 Trigger functions.
psMovementManager movement
 Movement system.
bool ready
 Ready to process events?

Detailed Description

Manages all control and movement related activities.

Takes in events from psEngine and sends them to psControlManager and psMovementManager as needed. This serves as public access to the control system, and creates/loads/saves all control mappings.

Definition at line 229 of file pscharcontrol.h.


Constructor & Destructor Documentation

psCharController::psCharController ( iEventNameRegistry *  eventname_reg)
psCharController::~psCharController ( )

Member Function Documentation

void psCharController::CancelMouseLook ( )
void psCharController::CenterMouse ( bool  value)
void psCharController::CreateKeys ( ) [protected]

Create all triggers.

const psControl* psCharController::GetMappedTrigger ( psControl::Device  device,
uint  button,
uint32  mods 
)

Get the triger mapped to a button, or NULL if none.

psMovementManager* psCharController::GetMovementManager ( ) [inline]

Provides access to the movement system.

Definition at line 242 of file pscharcontrol.h.

const psControl* psCharController::GetTrigger ( const char *  name)

Get a trigger by name.

bool psCharController::HandleEvent ( iEvent &  event)

Takes an event from psEngine, and dispatch it to either psControlManager or psMovementManager.

bool psCharController::Initialize ( )
bool psCharController::IsReady ( )
void psCharController::LoadDefaultKeys ( )

Resets key mappings to defaults.

void psCharController::LoadKeyFile ( )

loads the character-specific custom key mappings

bool psCharController::LoadKeys ( const char *  file) [protected]

Load all trigger mappings from file.

bool psCharController::MatchTrigger ( const char *  name,
psControl::Device  device,
uint  button,
uint32  mods 
)

Returns true if the trigger exists and is mapped to the specified combo.

bool psCharController::RemapTrigger ( const char *  name,
psControl::Device  device,
uint  button,
uint32  mods 
)

Changes the button set for a trigger. Returns false if does not exist or button is taken.

void psCharController::SaveKeys ( ) [protected]

Save custom trigger mappings.


Member Data Documentation

Key mappings.

Definition at line 270 of file pscharcontrol.h.

csEventID psCharController::event_mouseclick [protected]

Definition at line 279 of file pscharcontrol.h.

Trigger functions.

Definition at line 269 of file pscharcontrol.h.

Movement system.

Definition at line 271 of file pscharcontrol.h.

bool psCharController::ready [protected]

Ready to process events?

Definition at line 277 of file pscharcontrol.h.


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