Blender V2.61 - r43446
|
#include <SCA_KeyboardSensor.h>
Public Member Functions | |
SCA_KeyboardSensor (class SCA_KeyboardManager *keybdmgr, short int hotkey, short int qual, short int qual2, bool bAllKeys, const STR_String &targetProp, const STR_String &toggleProp, SCA_IObject *gameobj) | |
virtual | ~SCA_KeyboardSensor () |
virtual CValue * | GetReplica () |
virtual void | Init () |
short int | GetHotkey () |
virtual bool | Evaluate () |
virtual bool | IsPositiveTrigger () |
bool | TriggerOnAllKeys () |
The keyboard sensor listens to the keyboard, and passes on events on selected keystrokes. It has an alternate mode in which it logs keypresses to a property. Note that these modes are not mutually exclusive.
Definition at line 45 of file SCA_KeyboardSensor.h.
SCA_KeyboardSensor::SCA_KeyboardSensor | ( | class SCA_KeyboardManager * | keybdmgr, |
short int | hotkey, | ||
short int | qual, | ||
short int | qual2, | ||
bool | bAllKeys, | ||
const STR_String & | targetProp, | ||
const STR_String & | toggleProp, | ||
SCA_IObject * | gameobj | ||
) |
Definition at line 46 of file SCA_KeyboardSensor.cpp.
References SCA_KeyboardManager::GetInputDevice(), SCA_IInputDevice::HookEscape(), Init(), and SCA_IInputDevice::KX_ESCKEY.
Referenced by GetReplica().
SCA_KeyboardSensor::~SCA_KeyboardSensor | ( | ) | [virtual] |
Definition at line 70 of file SCA_KeyboardSensor.cpp.
bool SCA_KeyboardSensor::Evaluate | ( | ) | [virtual] |
Implements SCA_ISensor.
Definition at line 121 of file SCA_KeyboardSensor.cpp.
References SCA_IInputDevice::GetEventValue(), CValue::GetNumber(), SCA_ILogicBrick::GetParent(), CValue::GetProperty(), i, SCA_InputEvent::KX_ACTIVE, SCA_IInputDevice::KX_BEGINKEY, SCA_IInputDevice::KX_ENDKEY, SCA_InputEvent::KX_JUSTACTIVATED, SCA_InputEvent::KX_JUSTRELEASED, SCA_InputEvent::KX_NO_INPUTSTATUS, SCA_ISensor::m_eventmgr, SCA_ISensor::m_level, SCA_ISensor::m_reset, SCA_InputEvent::m_status, and SCA_ISensor::m_tap.
short int SCA_KeyboardSensor::GetHotkey | ( | ) |
Definition at line 95 of file SCA_KeyboardSensor.cpp.
CValue * SCA_KeyboardSensor::GetReplica | ( | void | ) | [virtual] |
Implements SCA_ISensor.
Definition at line 84 of file SCA_KeyboardSensor.cpp.
References Init(), SCA_ISensor::ProcessReplica(), and SCA_KeyboardSensor().
void SCA_KeyboardSensor::Init | ( | void | ) | [virtual] |
Reimplemented from SCA_ISensor.
Definition at line 74 of file SCA_KeyboardSensor.cpp.
References SCA_ISensor::m_invert, and SCA_ISensor::m_reset.
Referenced by GetReplica(), and SCA_KeyboardSensor().
bool SCA_KeyboardSensor::IsPositiveTrigger | ( | ) | [virtual] |
Reimplemented from SCA_ISensor.
Definition at line 102 of file SCA_KeyboardSensor.cpp.
References SCA_ISensor::m_invert.
bool SCA_KeyboardSensor::TriggerOnAllKeys | ( | ) |
Definition at line 114 of file SCA_KeyboardSensor.cpp.