mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-18 17:38:01 +02:00
Interim JSDoc for Reticle
This commit is contained in:
parent
2c39f2dbad
commit
8e22941ad7
1 changed files with 68 additions and 0 deletions
|
@ -172,6 +172,17 @@ private:
|
|||
ReticleInterface* _reticleInterface { nullptr };
|
||||
};
|
||||
|
||||
/**jsdoc
|
||||
* @namespace Reticle
|
||||
* @property {boolean} allowMouseCapture
|
||||
* @property {number} depth
|
||||
* @property {Vec2} maximumPosition
|
||||
* @property {boolean} mouseCaptured
|
||||
* @property {boolean} pointingAtSystemOverlay
|
||||
* @property {Vec2} position
|
||||
* @property {number} scale
|
||||
* @property {boolean} visible
|
||||
*/
|
||||
// Scripting interface available to control the Reticle
|
||||
class ReticleInterface : public QObject {
|
||||
Q_OBJECT
|
||||
|
@ -187,25 +198,82 @@ class ReticleInterface : public QObject {
|
|||
public:
|
||||
ReticleInterface(CompositorHelper* outer) : QObject(outer), _compositor(outer) {}
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.isMouseCaptured
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Q_INVOKABLE bool isMouseCaptured() { return _compositor->shouldCaptureMouse(); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.getAllowMouseCapture
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Q_INVOKABLE bool getAllowMouseCapture() { return _compositor->getAllowMouseCapture(); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.setAllowMouseCapture
|
||||
* @param {boolean} allowMouseCaptured
|
||||
*/
|
||||
Q_INVOKABLE void setAllowMouseCapture(bool value) { return _compositor->setAllowMouseCapture(value); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.isPointingAtSystemOverlay
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Q_INVOKABLE bool isPointingAtSystemOverlay() { return !_compositor->getReticleOverDesktop(); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.getVisible
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Q_INVOKABLE bool getVisible() { return _compositor->getReticleVisible(); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.setVisible
|
||||
* @param {boolean} visible
|
||||
*/
|
||||
Q_INVOKABLE void setVisible(bool visible) { _compositor->setReticleVisible(visible); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.getDepth
|
||||
* @returns {number}
|
||||
*/
|
||||
Q_INVOKABLE float getDepth() { return _compositor->getReticleDepth(); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.setDepth
|
||||
* @param {number} depth
|
||||
*/
|
||||
Q_INVOKABLE void setDepth(float depth) { _compositor->setReticleDepth(depth); }
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.getScale
|
||||
* @returns {number}
|
||||
*/
|
||||
Q_INVOKABLE float getScale() const;
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.setScale
|
||||
* @param {number} scale
|
||||
*/
|
||||
Q_INVOKABLE void setScale(float scale);
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.getPosition
|
||||
* @returns {Vec2}
|
||||
*/
|
||||
Q_INVOKABLE QVariant getPosition() const;
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.setPosition
|
||||
* @param {Vec2} position
|
||||
*/
|
||||
Q_INVOKABLE void setPosition(QVariant position);
|
||||
|
||||
/**jsdoc
|
||||
* @function Reticle.
|
||||
* @returns {Vec2}
|
||||
*/
|
||||
Q_INVOKABLE glm::vec2 getMaximumPosition() { return _compositor->getReticleMaximumPosition(); }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue