Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -27,6 +27,9 @@ HMDScriptingInterface::HMDScriptingInterface() { · 26 unmodified lines | |||
| 27 | connect(qApp, &Application::activeDisplayPluginChanged, [this]{ | 27 | connect(qApp, &Application::activeDisplayPluginChanged, [this]{ |
| 28 | emit displayModeChanged(isHMDMode()); | 28 | emit displayModeChanged(isHMDMode()); |
| 29 | }); | 29 | }); |
| 30 | connect(qApp, &Application::miniTabletEnabledChanged, [this](bool enabled) { | ||
| 31 | emit miniTabletEnabledChanged(enabled); | ||
| 32 | }); | ||
| 30 | } | 33 | } |
| 31 | 34 | ||
| 32 | glm::vec3 HMDScriptingInterface::calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const { | 35 | glm::vec3 HMDScriptingInterface::calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const { |
| @@ -123,6 +126,15 @@ void HMDScriptingInterface::setShouldShowTablet(bool value) { · 90 unmodified lines | |||
| 123 | _tabletContextualMode = false; | 126 | _tabletContextualMode = false; |
| 124 | } | 127 | } |
| 125 | 128 | ||
| 129 | void HMDScriptingInterface::setMiniTabletEnabled(bool enabled) { | ||
| 130 | qApp->setMiniTabletEnabled(enabled); | ||
| 131 | } | ||
| 132 | |||
| 133 | bool HMDScriptingInterface::getMiniTabletEnabled() { | ||
| 134 | return qApp->getMiniTabletEnabled(); | ||
| 135 | } | ||
| 136 | |||
| 137 | |||
| 126 | QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { | 138 | QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) { |
| 127 | glm::vec3 hudIntersection; | 139 | glm::vec3 hudIntersection; |
| 128 | auto instance = DependencyManager::get<HMDScriptingInterface>(); | 140 | auto instance = DependencyManager::get<HMDScriptingInterface>(); |