#include <uInput.h>


Public Types | |
| enum | uInputType { uINPUT_DIGITAL, uINPUT_ANALOG } |
Public Member Functions | |
| uAction (uAction *&anchor, const char *name, int priority=0, uInputType t=uINPUT_DIGITAL) | |
| uAction (uAction *&anchor, const char *name, const tOutput &desc, const tOutput &help, int priority=0, uInputType t=uINPUT_DIGITAL) | |
| virtual | ~uAction () |
| unsigned short | ID () const |
Static Public Member Functions | |
| static uAction * | Find (char const *name) |
| find an action of the given name | |
Public Attributes | |
| uInputType | type |
| int | priority |
| tString | internalName |
| const tOutput | description |
| const tOutput | helpText |
Protected Attributes | |
| int | localID |
| int | globalID |
Definition at line 51 of file uInput.h.
| enum uAction::uInputType |
| uAction::uAction | ( | uAction *& | anchor, | |
| const char * | name, | |||
| int | priority = 0, |
|||
| uInputType | t = uINPUT_DIGITAL | |||
| ) |
Definition at line 46 of file uInput.cpp.
References description, globalID, helpText, localID, su_allActionsLen, tASSERT, tToLower(), and uMAX_ACTIONS.
00049 :tListItem<uAction>(anchor),type(t),priority(priority_),internalName(name){ 00050 globalID = localID = su_allActionsLen++; 00051 00052 tASSERT(localID < uMAX_ACTIONS); 00053 00054 su_allActions[localID] = this; 00055 00056 tString descname; 00057 descname << "input_" << name << "_text"; 00058 tToLower( descname ); 00059 00060 const_cast<tOutput&>(description).AddLocale(descname); 00061 00062 tString helpname; 00063 helpname << "input_" << name << "_help"; 00064 tToLower( helpname ); 00065 00066 const_cast<tOutput&>(helpText).AddLocale(helpname); 00067 }

| uAction::uAction | ( | uAction *& | anchor, | |
| const char * | name, | |||
| const tOutput & | desc, | |||
| const tOutput & | help, | |||
| int | priority = 0, |
|||
| uInputType | t = uINPUT_DIGITAL | |||
| ) |
Definition at line 69 of file uInput.cpp.
References globalID, localID, su_allActionsLen, tASSERT, and uMAX_ACTIONS.
00074 :tListItem<uAction>(anchor),type(t),priority(priority_),internalName(name), description(desc), helpText(help){ 00075 globalID = localID = su_allActionsLen++; 00076 00077 tASSERT(localID < uMAX_ACTIONS); 00078 00079 su_allActions[localID] = this; 00080 }
| uAction::~uAction | ( | ) | [virtual] |
| uAction * uAction::Find | ( | char const * | name | ) | [static] |
find an action of the given name
Definition at line 86 of file uInput.cpp.
References internalName, and su_allActionsLen.
Referenced by uBindPlayer::NewBind(), and uBind::uBind().
00087 { 00088 for (int i=su_allActionsLen-1;i>=0;i--) 00089 if (!strcmp(name,su_allActions[i]->internalName)) 00090 return su_allActions[i]; 00091 00092 return 0; 00093 }

| unsigned short uAction::ID | ( | ) | const [inline] |
Definition at line 83 of file uInput.h.
References globalID.
Referenced by uActionPlayer::Find(), and eNetGameObject::SendControl().
00083 {return globalID;}

int uAction::localID [protected] |
int uAction::globalID [protected] |
Definition at line 54 of file uInput.h.
Referenced by ID(), uActionGlobal::operator==(), uActionCamera::operator==(), uActionPlayer::operator==(), and uAction().
Definition at line 60 of file uInput.h.
Referenced by Find(), uJoystick::GetPersistentID(), uJoystick::uJoystick(), and uBind::Write().
| const tOutput uAction::description |
| const tOutput uAction::helpText |
1.5.4