예제 #1
0
/* add count copies of the characater code to the input buffer */
static void inputAddBuffer(UDWORD key, utf_32_char unicode)
{
	inputBuffer.push_back(InputKey(key, unicode));
}
예제 #2
0
	void Input::Init( HGE* pHGE )
	{
		//To Do: Read/Store keys from file	
		m_pHGE = pHGE;

		m_InputKeyVector.push_back( InputKey( InputTypes::LeftClick, HGEK_LBUTTON ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::RightClick, HGEK_RBUTTON ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveLeft, HGEK_A ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveLeft, HGEK_LEFT ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveRight, HGEK_D ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveRight, HGEK_RIGHT ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveUp, HGEK_W ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveUp, HGEK_UP ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveDown, HGEK_S ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::MoveDown, HGEK_DOWN ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Escape, HGEK_ESCAPE ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::AlternateAction, HGEK_SHIFT ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar0, HGEK_0 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar1, HGEK_1 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar2, HGEK_2 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar3, HGEK_3 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar4, HGEK_4 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar5, HGEK_5 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar6, HGEK_6 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar7, HGEK_7 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar8, HGEK_8 ) );
		m_InputKeyVector.push_back( InputKey( InputTypes::Hotbar9, HGEK_9 ) );


	
	}
예제 #3
0
/**
**  Handle key up.
**
**  @param key      Key scancode.
**  @param keychar  Character code.
*/
void HandleKeyRepeat(unsigned, unsigned keychar)
{
	if (KeyState == KeyStateInput && keychar) {
		InputKey(keychar);
	}
}
예제 #4
0
void AShooterPlayerController::SimulateInputKey(FKey Key, bool bPressed)
{
	InputKey(Key, bPressed ? IE_Pressed : IE_Released, 1, false);
}