- Code: Select all
void CHDViewInput::OnKeyCodePressed(KeyCode code)
{
if( IsJoystickAxisCode(code) ) {
if( code == KEY_XSTICK1_UP )
m_bMoveUp = true;
else if( code == KEY_XSTICK1_DOWN )
m_bMoveDown = true;
else if( code == KEY_XSTICK1_LEFT )
m_bMoveLeft = true;
else if( code == KEY_XSTICK1_RIGHT )
m_bMoveRight = true;
return;
}
}
In 2007, this code would capture the left analog stick and ignore all other joypad input. However, in 2013 SDK this does nothing. This is probably due to the improved controller support in the new SDK. Now you can control the main menu with the dpad on your joystick; you couldn't do that back in 2007.
Does anybody know how to make my VGUI panel capture the left analog stick of the joypad in 2013?