History

Display audio stats in tablet

David Rowe committed 9 years ago

Commit 2b53cb41 parent b985b341 file · +17 −11Browse files

Showing the changes to scripts/developer (1 of 1 file). Show all

Unified · Split

scripts/developer/utilities/audio/stats.js+17−11
@@ -9,17 +9,23 @@ · 8 unmodified lines
99 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
1010 //
1111
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();
1417
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;
2321
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);
2529
30+ window.closed.connect(function () { Script.stop(); });
31+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t