event handler
More...
#include <EventHandler.h>
|
virtual int | OnEvent (const IEvent *event, const string &sScriptCode) |
| the callback function, when a given event is fired. More...
|
|
const string & | GetCode () const |
|
const string & | GetFileName () const |
|
void | SetScript (const string &sScript) |
|
bool | Equals (const CEventHandler &e) const |
|
bool | Equals (const string &sID) const |
|
bool | IsMouseEvent () const |
|
bool | IsKeyEvent () const |
|
bool | IsEditorEvent () const |
|
bool | IsSystemEvent () const |
|
bool | IsNetworkEvent () const |
|
bool | IsTouchEvent () const |
|
bool | IsEvent (int nEventType) const |
|
DWORD | GetType () |
| get the event type. More...
|
|
| CEventHandler (DWORD nType, const string &sID, const string &sScript) |
|
| CEventHandler (const string &sID, const string &sScript) |
|
§ CEventHandler()
CEventHandler::CEventHandler |
( |
const string & |
sID, |
|
|
const string & |
sScript |
|
) |
| |
- Parameters
-
sID | if sID begins with "_m" it is treated as a mouse click event, except that if sID begins with "_mm" it is treated as a mouse move event. if sID begins with "_md" it is treated as a mouse down event. if sID begins with "_mu" it is treated as a mouse up event. if sID begins with "_k" it is treated as a key down event. if sID begins with "_ku" it is treated as a key up event. if sID begins with "_n" it is treated as a networking event. if sID begins with "_s" it is treated as a system event. if sID begins with "_e" it is treated as a editor event. |
§ GetType()
DWORD ParaEngine::CEventHandler::GetType |
( |
| ) |
|
|
inline |
§ OnEvent()
int CEventHandler::OnEvent |
( |
const IEvent * |
event, |
|
|
const string & |
sScriptCode |
|
) |
| |
|
virtual |
the callback function, when a given event is fired.
- Parameters
-
event | the input event object to the callback. |
sScriptCode | this is usually event.ToScriptCode(); It just avoid the callback to call event.ToScriptCode() to recompute script code. |
- Returns
- : same as NPL.activate return value.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/Core/EventHandler.h
- Client/trunk/ParaEngineClient/Core/EventHandler.cpp