Showing the changes to scripts/developer (1 of 1 file). Show all
Unified · Split
| @@ -9,17 +9,23 @@ · 8 unmodified lines | ||
| 9 | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | 10 | // |
| 11 | 11 | |
| 12 | −var INITIAL_WIDTH = 400; | |
| 13 | −var INITIAL_OFFSET = 50; | |
| 12 | +if (HMD.active && !Settings.getValue("HUDUIEnabled")) { | |
| 13 | + var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); | |
| 14 | + var qml = Script.resolvePath("stats.qml"); | |
| 15 | + tablet.loadQMLSource(qml); | |
| 16 | + Script.stop(); | |
| 14 | 17 | |
| 15 | −// Set up the qml ui | |
| 16 | −var qml = Script.resolvePath('stats.qml'); | |
| 17 | −var window = new OverlayWindow({ | |
| 18 | − title: 'Audio Interface Statistics', | |
| 19 | − source: qml, | |
| 20 | − width: 500, height: 520 // stats.qml may be too large for some screens | |
| 21 | −}); | |
| 22 | −window.setPosition(INITIAL_OFFSET, INITIAL_OFFSET); | |
| 18 | +} else { | |
| 19 | + var INITIAL_WIDTH = 400; | |
| 20 | + var INITIAL_OFFSET = 50; | |
| 23 | 21 | |
| 24 | −window.closed.connect(function() { Script.stop(); }); | |
| 22 | + var qml = Script.resolvePath("stats.qml"); | |
| 23 | + var window = new OverlayWindow({ | |
| 24 | + title: "Audio Interface Statistics", | |
| 25 | + source: qml, | |
| 26 | + width: 500, height: 520 // stats.qml may be too large for some screens | |
| 27 | + }); | |
| 28 | + window.setPosition(INITIAL_OFFSET, INITIAL_OFFSET); | |
| 25 | 29 | |
| 30 | + window.closed.connect(function () { Script.stop(); }); | |
| 31 | +} | |