History

fix action events for gamepad;

Atlante45 committed 11 years ago

Commit 88a576f1 parent 69f7a891 file · +4 −2Browse files

Showing the changes to interface/src/scripting/JoystickScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/JoystickScriptingInterface.cpp+4−2
@@ -132,8 +132,10 @@ void JoystickScriptingInterface::update() { · 131 unmodified lines
132 : HFActionEvent::endType();132 : HFActionEvent::endType();
133 133
134 // global action events fire in the center of the screen134 // global action events fire in the center of the screen
135 HFActionEvent actionEvent(actionType,135 Application* app = Application::getInstance();
136 Application::getInstance()->getCamera()->computeViewPickRay(0.5f, 0.5f));136 PickRay pickRay = app->getCamera()->computeViewPickRay(app->getTrueMouseX(),
137 app->getTrueMouseY());
138 HFActionEvent actionEvent(actionType, pickRay);
137 qApp->sendEvent(qApp, &actionEvent);139 qApp->sendEvent(qApp, &actionEvent);
138 }140 }
139 141