Is there a proper way to access the joystick? I have my:
void Level::GamePadConnected( Urho3D::StringHash eventType, Urho3D::VariantMap& eventData ) {
std::cout << "GamePad Connected" << std::endl;
};
void Level::GamePadDisconnected( Urho3D::StringHash eventType, Urho3D::VariantMap& eventData ) {
std::cout << "GamePad Disconnected" << std::endl;
};
void Level::GamePadButtonDown( Urho3D::StringHash eventType, Urho3D::VariantMap& eventData ) {
std::cout << "GamePad Button Down" << std::endl;
};
void Level::GamePadButtonUp( Urho3D::StringHash eventType, Urho3D::VariantMap& eventData ) {
std::cout << "GamePad Button Up" << std::endl;
};
void Level::GamePadAxisMove( Urho3D::StringHash eventType, Urho3D::VariantMap& eventData ) {
std::cout << "GamePad Axis Move" << std::endl;
};
void Level::GamePadHatMove( Urho3D::StringHash eventType, Urho3D::VariantMap& eventData ) {
std::cout << "GamePad Hat Move" << std::endl;
};
SubscribeToEvent( Urho3D::E_KEYDOWN, URHO3D_HANDLER( Level, HandleKeyDown ) );
SubscribeToEvent( Urho3D::E_JOYSTICKCONNECTED, URHO3D_HANDLER( Level, GamePadConnected ) );
SubscribeToEvent( Urho3D::E_JOYSTICKDISCONNECTED, URHO3D_HANDLER( Level, GamePadDisconnected ) );
SubscribeToEvent( Urho3D::E_JOYSTICKBUTTONDOWN, URHO3D_HANDLER( Level, GamePadButtonDown ) );
SubscribeToEvent( Urho3D::E_JOYSTICKBUTTONUP, URHO3D_HANDLER( Level, GamePadButtonUp ) );
SubscribeToEvent( Urho3D::E_JOYSTICKAXISMOVE, URHO3D_HANDLER( Level, GamePadAxisMove ) );
SubscribeToEvent( Urho3D::E_JOYSTICKHATMOVE, URHO3D_HANDLER( Level, GamePadHatMove ) );
But can not figure out how to get the values out. Joystick IDs, values for different axis, buttons, etc. I have searched and searched but can not find anything on Google or in the samples.
This is as far as I have gotten. I have four gamepads connected for four players.