mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 13:12:39 +02:00
recenter log window when enter and exiting hmd mode
This commit is contained in:
parent
b5a1dc599b
commit
20d933ce6e
1 changed files with 9 additions and 0 deletions
|
@ -68,14 +68,23 @@ var window = new OverlayWindow({
|
|||
|
||||
if (hasPosition) {
|
||||
window.setPosition(windowX, windowY);
|
||||
};
|
||||
|
||||
function recenterWindow() {
|
||||
window.setPosition(100, 100);
|
||||
}
|
||||
|
||||
window.visibleChanged.connect(function() {
|
||||
if (!window.visible) {
|
||||
window.setVisible(true);
|
||||
recenterWindow();
|
||||
}
|
||||
});
|
||||
|
||||
HMD.displayModeChanged.connect(function(isHMDMode) {
|
||||
recenterWindow();
|
||||
});
|
||||
|
||||
window.closed.connect(function () { Script.stop(); });
|
||||
|
||||
function shouldLogMessage(scriptFileName) {
|
||||
|
|
Loading…
Reference in a new issue