History

recenter log window when enter and exiting hmd mode

Dante Ruiz committed 7 years ago

Commit 20d933c1 parent b5a1dc51 file · +9 −0Browse files

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

Unified · Split

scripts/developer/debugging/debugWindow.js+9−0
@@ -68,14 +68,23 @@ var window = new OverlayWindow({ · 67 unmodified lines
6868
6969 if (hasPosition) {
7070 window.setPosition(windowX, windowY);
71+};
72+
73+function recenterWindow() {
74+ window.setPosition(100, 100);
7175 }
7276
7377 window.visibleChanged.connect(function() {
7478 if (!window.visible) {
7579 window.setVisible(true);
80+ recenterWindow();
7681 }
7782 });
7883
84+HMD.displayModeChanged.connect(function(isHMDMode) {
85+ recenterWindow();
86+});
87+
7988 window.closed.connect(function () { Script.stop(); });
8089
8190 function shouldLogMessage(scriptFileName) {

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