mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 21:33:00 +02:00
Merge pull request #14789 from danteruiz/recenter-hmd-log-window
Case 20771: Make sure that the script log is in the correct location when switching to and from HMD
This commit is contained in:
commit
08a3e65f66
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