History

Merge hifi/master into hifi/out-of-body-experience

Andrew Meadows committed 10 years ago

Commit 51a9a992 parents c8ad52c b588114232 files · +4340 −2687Browse files

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

Unified · Split

interface/src/scripting/HMDScriptingInterface.cpp+14−0
@@ -57,6 +57,20 @@ bool HMDScriptingInterface::isHandControllerAvailable() { · 56 unmodified lines
5757 return PluginUtils::isHandControllerAvailable();
5858 }
5959
60+void HMDScriptingInterface::requestShowHandControllers() {
61+ _showHandControllersCount++;
62+ emit shouldShowHandControllersChanged();
63+}
64+
65+void HMDScriptingInterface::requestHideHandControllers() {
66+ _showHandControllersCount--;
67+ emit shouldShowHandControllersChanged();
68+}
69+
70+bool HMDScriptingInterface::shouldShowHandControllers() const {
71+ return _showHandControllersCount > 0;
72+}
73+
6074 QScriptValue HMDScriptingInterface::getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine) {
6175 glm::vec3 hudIntersection;
6276 auto instance = DependencyManager::get<HMDScriptingInterface>();