Showing the changes to scripts/developer/debugging/debugWindow.js (1 of 1 file). Show all
Unified · Split
| @@ -68,14 +68,23 @@ var window = new OverlayWindow({ · 67 unmodified lines | ||
| 68 | 68 | |
| 69 | 69 | if (hasPosition) { |
| 70 | 70 | window.setPosition(windowX, windowY); |
| 71 | +}; | |
| 72 | + | |
| 73 | +function recenterWindow() { | |
| 74 | + window.setPosition(100, 100); | |
| 71 | 75 | } |
| 72 | 76 | |
| 73 | 77 | window.visibleChanged.connect(function() { |
| 74 | 78 | if (!window.visible) { |
| 75 | 79 | window.setVisible(true); |
| 80 | + recenterWindow(); | |
| 76 | 81 | } |
| 77 | 82 | }); |
| 78 | 83 | |
| 84 | +HMD.displayModeChanged.connect(function(isHMDMode) { | |
| 85 | + recenterWindow(); | |
| 86 | +}); | |
| 87 | + | |
| 79 | 88 | window.closed.connect(function () { Script.stop(); }); |
| 80 | 89 | |
| 81 | 90 | function shouldLogMessage(scriptFileName) { |