Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -30,6 +30,9 @@ HMDScriptingInterface::HMDScriptingInterface() { · 29 unmodified lines | |||
| 30 | connect(qApp, &Application::miniTabletEnabledChanged, [this](bool enabled) { | 30 | connect(qApp, &Application::miniTabletEnabledChanged, [this](bool enabled) { |
| 31 | emit miniTabletEnabledChanged(enabled); | 31 | emit miniTabletEnabledChanged(enabled); |
| 32 | }); | 32 | }); |
| 33 | connect(qApp, &Application::awayStateWhenFocusLostInVRChanged, [this](bool enabled) { | ||
| 34 | emit awayStateWhenFocusLostInVRChanged(enabled); | ||
| 35 | }); | ||
| 33 | } | 36 | } |
| 34 | 37 | ||
| 35 | glm::vec3 HMDScriptingInterface::calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const { | 38 | glm::vec3 HMDScriptingInterface::calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const { |
| @@ -137,6 +140,14 @@ bool HMDScriptingInterface::getMiniTabletEnabled() { · 101 unmodified lines | |||
| 137 | return qApp->getMiniTabletEnabled(); | 140 | return qApp->getMiniTabletEnabled(); |
| 138 | } | 141 | } |
| 139 | 142 | ||
| 143 | void HMDScriptingInterface::setAwayStateWhenFocusLostInVREnabled(bool enabled) { | ||
| 144 | qApp->setAwayStateWhenFocusLostInVREnabled(enabled); | ||
| 145 | } | ||
| 146 | |||
| 147 | bool HMDScriptingInterface::getAwayStateWhenFocusLostInVREnabled() { | ||
| 148 | return qApp->getAwayStateWhenFocusLostInVREnabled(); | ||
| 149 | } | ||
| 150 | |||
| 140 | 151 | ||
| 141 | QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { | 152 | QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { |
| 142 | glm::vec3 hudIntersection; | 153 | glm::vec3 hudIntersection; |