Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_KeyboardSensor.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index 5208252ceae..9a2dd9bdd57 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -351,12 +351,12 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
GetParent()->SetProperty(m_targetprop, newstringprop);
newstringprop->Release();
- }
+ }
} else {
/* append */
char pchar = ToCharacter(keyIndex, IsShifted());
STR_String newprop = tprop->GetText() + pchar;
- CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
+ CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
GetParent()->SetProperty(m_targetprop, newstringprop);
newstringprop->Release();
}
@@ -365,7 +365,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
/* Make a new property. Deletes can be ignored. */
char pchar = ToCharacter(keyIndex, IsShifted());
STR_String newprop = pchar;
- CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
+ CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
GetParent()->SetProperty(m_targetprop, newstringprop);
newstringprop->Release();
}
@@ -376,7 +376,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
/**
* Tests whether shift is pressed
- */
+ */
bool SCA_KeyboardSensor::IsShifted(void)
{
SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice();
@@ -391,9 +391,10 @@ bool SCA_KeyboardSensor::IsShifted(void)
== SCA_InputEvent::KX_JUSTACTIVATED)
) {
return true;
- } else {
+ }
+ else {
return false;
- }
+ }
}
void SCA_KeyboardSensor::LogKeystrokes(void)
@@ -494,25 +495,25 @@ PyAttributeDef SCA_KeyboardSensor::Attributes[] = {
};
-PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
+PyObject *SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_KeyboardSensor* self= static_cast<SCA_KeyboardSensor*>(self_v);
SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)self->m_eventmgr)->GetInputDevice();
- PyObject* resultlist = PyList_New(0);
+ PyObject *resultlist = PyList_New(0);
for (int i=SCA_IInputDevice::KX_BEGINKEY ; i<= SCA_IInputDevice::KX_ENDKEY;i++)
{
const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) i);
if (inevent.m_status != SCA_InputEvent::KX_NO_INPUTSTATUS)
{
- PyObject* keypair = PyList_New(2);
+ PyObject *keypair = PyList_New(2);
PyList_SET_ITEM(keypair,0,PyLong_FromSsize_t(i));
PyList_SET_ITEM(keypair,1,PyLong_FromSsize_t(inevent.m_status));
PyList_Append(resultlist,keypair);
}
- }
+ }
return resultlist;
}
@@ -655,7 +656,7 @@ bool IsPrintable(int keyIndex)
/**
* Tests whether this is a delete key.
- */
+ */
bool IsDelete(int keyIndex)
{
if ( (keyIndex == SCA_IInputDevice::KX_DELKEY)