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 | if (hasPosition) { | 69 | if (hasPosition) { |
| 70 | window.setPosition(windowX, windowY); | 70 | window.setPosition(windowX, windowY); |
| 71 | }; | ||
| 72 | |||
| 73 | function recenterWindow() { | ||
| 74 | window.setPosition(100, 100); | ||
| 71 | } | 75 | } |
| 72 | 76 | ||
| 73 | window.visibleChanged.connect(function() { | 77 | window.visibleChanged.connect(function() { |
| 74 | if (!window.visible) { | 78 | if (!window.visible) { |
| 75 | window.setVisible(true); | 79 | window.setVisible(true); |
| 80 | recenterWindow(); | ||
| 76 | } | 81 | } |
| 77 | }); | 82 | }); |
| 78 | 83 | ||
| 84 | HMD.displayModeChanged.connect(function(isHMDMode) { | ||
| 85 | recenterWindow(); | ||
| 86 | }); | ||
| 87 | |||
| 79 | window.closed.connect(function () { Script.stop(); }); | 88 | window.closed.connect(function () { Script.stop(); }); |
| 80 | 89 | ||
| 81 | function shouldLogMessage(scriptFileName) { | 90 | function shouldLogMessage(scriptFileName) { |