Showing the changes to interface/src/scripting/HMDScriptingInterface.h (1 of 15 files). Show all
Unified · Split
| @@ -28,6 +28,8 @@ class HMDScriptingInterface : public AbstractHMDScriptingInterface, public Depen · 27 unmodified lines | ||
| 28 | 28 | Q_PROPERTY(glm::vec3 position READ getPosition) |
| 29 | 29 | Q_PROPERTY(glm::quat orientation READ getOrientation) |
| 30 | 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 | |
| 32 | 34 | public: |
| 33 | 35 | Q_INVOKABLE glm::vec3 calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction) const; |
| @@ -52,11 +54,11 @@ public: · 18 unmodified lines | ||
| 52 | 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 | 58 | /// not be interrupted by a keyboard popup |
| 57 | 59 | /// Returns false if there is already an active keyboard displayed. |
| 58 | 60 | /// 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 | 62 | /// call to unsuppressKeyboard() within a reasonable amount of time |
| 61 | 63 | Q_INVOKABLE bool suppressKeyboard(); |
| 62 | 64 | |
| @@ -79,10 +81,19 @@ public: · 16 unmodified lines | ||
| 79 | 81 | |
| 80 | 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 | + | |
| 82 | 90 | 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 | + | |
| 83 | 94 | // Get the position of the HMD |
| 84 | 95 | glm::vec3 getPosition() const; |
| 85 | − | |
| 96 | + | |
| 86 | 97 | // Get the orientation of the HMD |
| 87 | 98 | glm::quat getOrientation() const; |
| 88 | 99 | |