Steam JSDoc

This commit is contained in:
David Rowe 2019-10-08 11:22:19 +13:00
parent 3db915c432
commit ffb73d5dbf

View file

@ -41,13 +41,16 @@ public:
}; };
/**jsdoc /**jsdoc
* The <code>Steam</code> API provides facilities for working with the Steam version of Interface.
*
* @namespace Steam * @namespace Steam
* *
* @hifi-interface * @hifi-interface
* @hifi-client-entity * @hifi-client-entity
* @hifi-avatar * @hifi-avatar
* *
* @property {boolean} running - <em>Read-only.</em> * @property {boolean} running - <code>true</code> if Interface is running under Steam, <code>false</code> if it isn't.
* <em>Read-only.</em>
*/ */
class SteamScriptingInterface : public QObject { class SteamScriptingInterface : public QObject {
@ -61,13 +64,22 @@ public:
public slots: public slots:
/**jsdoc /**jsdoc
* Gets whether Interface is running under Steam.
* @function Steam.isRunning * @function Steam.isRunning
* @returns {boolean} * @returns {boolean} <code>true</code> if Interface is running under Steam, <code>false</code> if it isn't.
*/ */
bool isRunning() const { return _plugin && _plugin->isRunning(); } bool isRunning() const { return _plugin && _plugin->isRunning(); }
/**jsdoc /**jsdoc
* Opens Steam's "Choose Friends to invite" dialog if Interface is running under Steam.
* @function Steam.openInviteOverlay * @function Steam.openInviteOverlay
* @example <caption>Invite Steam friends to join you in High Fidelity.</caption>
* if (Steam.running) {
* print("Invite Steam friends to joint you...");
* Steam.openInviteOverlay();
* } else {
* print("Interface isn't running under Steam.");
* }
*/ */
void openInviteOverlay() const { if (_plugin) { _plugin->openInviteOverlay(); } } void openInviteOverlay() const { if (_plugin) { _plugin->openInviteOverlay(); } }