Cleanup. (This was written by Chris but InputHandler_MonkeyKeyboard.h was written by Glenn?)
This commit is contained in:
@@ -14,7 +14,7 @@ InputHandler_MonkeyKeyboard::~InputHandler_MonkeyKeyboard()
|
|||||||
|
|
||||||
void InputHandler_MonkeyKeyboard::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevicesOut )
|
void InputHandler_MonkeyKeyboard::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevicesOut )
|
||||||
{
|
{
|
||||||
vDevicesOut.push_back( InputDeviceInfo(DEVICE_KEYBOARD,"MonkeyKeyboard") );
|
vDevicesOut.push_back( InputDeviceInfo(DEVICE_KEYBOARD, "MonkeyKeyboard") );
|
||||||
}
|
}
|
||||||
|
|
||||||
static const DeviceButton g_keys[] =
|
static const DeviceButton g_keys[] =
|
||||||
@@ -62,7 +62,7 @@ void InputHandler_MonkeyKeyboard::Update()
|
|||||||
if( m_diLast.IsValid() )
|
if( m_diLast.IsValid() )
|
||||||
{
|
{
|
||||||
// End the previous key
|
// End the previous key
|
||||||
ButtonPressed(m_diLast, false);
|
ButtonPressed( m_diLast, false );
|
||||||
m_diLast.MakeInvalid();
|
m_diLast.MakeInvalid();
|
||||||
}
|
}
|
||||||
InputHandler::UpdateTimer();
|
InputHandler::UpdateTimer();
|
||||||
@@ -74,11 +74,11 @@ void InputHandler_MonkeyKeyboard::Update()
|
|||||||
if( fSecsAgo > 0.5 )
|
if( fSecsAgo > 0.5 )
|
||||||
{
|
{
|
||||||
// End the previous key
|
// End the previous key
|
||||||
ButtonPressed(m_diLast, false);
|
ButtonPressed( m_diLast, false );
|
||||||
|
|
||||||
// Choose a new key and send it.
|
// Choose a new key and send it.
|
||||||
m_diLast = DeviceInput(DEVICE_KEYBOARD,GetRandomKeyboardKey());
|
m_diLast = DeviceInput( DEVICE_KEYBOARD, GetRandomKeyboardKey() );
|
||||||
ButtonPressed(m_diLast, true);
|
ButtonPressed( m_diLast, true );
|
||||||
|
|
||||||
m_timerPressButton.Touch();
|
m_timerPressButton.Touch();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user