History

bring over some previous tablet-ui work

Seth Alves committed 9 years ago

Commit 369f61e1 parent 401f49f15 files · +322 −53Browse files

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

Unified · Split

interface/src/scripting/HMDScriptingInterface.h+14−3
@@ -28,6 +28,8 @@ class HMDScriptingInterface : public AbstractHMDScriptingInterface, public Depen · 27 unmodified lines
2828 Q_PROPERTY(glm::vec3 position READ getPosition)
2929 Q_PROPERTY(glm::quat orientation READ getOrientation)
3030 Q_PROPERTY(bool mounted READ isMounted)
31+ Q_PROPERTY(bool showTablet READ getShouldShowTablet)
32+ Q_PROPERTY(QUuid tabletID READ getCurrentTableUIID WRITE setCurrentTabletUIID)
3133
3234 public:
3335 Q_INVOKABLE glm::vec3 calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const;
@@ -52,11 +54,11 @@ public: · 18 unmodified lines
5254 Q_INVOKABLE void disableExtraLaser() const;
5355
5456
55− /// Suppress the activation of any on-screen keyboard so that a script operation will
57+ /// Suppress the activation of any on-screen keyboard so that a script operation will
5658 /// not be interrupted by a keyboard popup
5759 /// Returns false if there is already an active keyboard displayed.
5860 /// Clients should re-enable the keyboard when the operation is complete and ensure
59− /// that they balance any call to suppressKeyboard() that returns true with a corresponding
61+ /// that they balance any call to suppressKeyboard() that returns true with a corresponding
6062 /// call to unsuppressKeyboard() within a reasonable amount of time
6163 Q_INVOKABLE bool suppressKeyboard();
6264
@@ -79,10 +81,19 @@ public: · 16 unmodified lines
7981
8082 bool isMounted() const;
8183
84+ void toggleShouldShowTablet() { _showTablet = !_showTablet; }
85+ bool getShouldShowTablet() const { return _showTablet; }
86+
87+ void setCurrentTabletUIID(QUuid tabletID) { _tabletUIID = tabletID; }
88+ QUuid getCurrentTableUIID() { return _tabletUIID; }
89+
8290 private:
91+ bool _showTablet { false };
92+ QUuid _tabletUIID; // this is the entityID of the WebEntity which is part of (a child of) the tablet-ui.
93+
8394 // Get the position of the HMD
8495 glm::vec3 getPosition() const;
85−
96+
8697 // Get the orientation of the HMD
8798 glm::quat getOrientation() const;
8899