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
28 Q_PROPERTY(glm::vec3 position READ getPosition)28 Q_PROPERTY(glm::vec3 position READ getPosition)
29 Q_PROPERTY(glm::quat orientation READ getOrientation)29 Q_PROPERTY(glm::quat orientation READ getOrientation)
30 Q_PROPERTY(bool mounted READ isMounted)30 Q_PROPERTY(bool mounted READ isMounted)
31 Q_PROPERTY(bool showTablet READ getShouldShowTablet)
32 Q_PROPERTY(QUuid tabletID READ getCurrentTableUIID WRITE setCurrentTabletUIID)
31 33
32public:34public:
33 Q_INVOKABLE glm::vec3 calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const;35 Q_INVOKABLE glm::vec3 calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const;
@@ -52,11 +54,11 @@ public: · 18 unmodified lines
52 Q_INVOKABLE void disableExtraLaser() const;54 Q_INVOKABLE void disableExtraLaser() const;
53 55
54 56
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
56 /// not be interrupted by a keyboard popup58 /// not be interrupted by a keyboard popup
57 /// Returns false if there is already an active keyboard displayed.59 /// Returns false if there is already an active keyboard displayed.
58 /// Clients should re-enable the keyboard when the operation is complete and ensure60 /// 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
60 /// call to unsuppressKeyboard() within a reasonable amount of time62 /// call to unsuppressKeyboard() within a reasonable amount of time
61 Q_INVOKABLE bool suppressKeyboard();63 Q_INVOKABLE bool suppressKeyboard();
62 64
@@ -79,10 +81,19 @@ public: · 16 unmodified lines
79 81
80 bool isMounted() const;82 bool isMounted() const;
81 83
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
82private:90private:
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
83 // Get the position of the HMD94 // Get the position of the HMD
84 glm::vec3 getPosition() const;95 glm::vec3 getPosition() const;
85 96
86 // Get the orientation of the HMD97 // Get the orientation of the HMD
87 glm::quat getOrientation() const;98 glm::quat getOrientation() const;
88 99