History

Add setting to enable/disable the mini tablet

David Rowe committed 8 years ago

Commit 28097931 parent 5e013146 files · +74 −7Browse files

Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

interface/src/scripting/HMDScriptingInterface.cpp+12−0
@@ -27,6 +27,9 @@ HMDScriptingInterface::HMDScriptingInterface() { · 26 unmodified lines
2727 connect(qApp, &Application::activeDisplayPluginChanged, [this]{
2828 emit displayModeChanged(isHMDMode());
2929 });
30+ connect(qApp, &Application::miniTabletEnabledChanged, [this](bool enabled) {
31+ emit miniTabletEnabledChanged(enabled);
32+ });
3033 }
3134
3235 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
123126 _tabletContextualMode = false;
124127 }
125128
129+void HMDScriptingInterface::setMiniTabletEnabled(bool enabled) {
130+ qApp->setMiniTabletEnabled(enabled);
131+}
132+
133+bool HMDScriptingInterface::getMiniTabletEnabled() {
134+ return qApp->getMiniTabletEnabled();
135+}
136+
137+
126138 QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) {
127139 glm::vec3 hudIntersection;
128140 auto instance = DependencyManager::get<HMDScriptingInterface>();