mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 14:50:36 +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) {
|
if (hasPosition) {
|
||||||
window.setPosition(windowX, windowY);
|
window.setPosition(windowX, windowY);
|
||||||
|
};
|
||||||
|
|
||||||
|
function recenterWindow() {
|
||||||
|
window.setPosition(100, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.visibleChanged.connect(function() {
|
window.visibleChanged.connect(function() {
|
||||||
if (!window.visible) {
|
if (!window.visible) {
|
||||||
window.setVisible(true);
|
window.setVisible(true);
|
||||||
|
recenterWindow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
HMD.displayModeChanged.connect(function(isHMDMode) {
|
||||||
|
recenterWindow();
|
||||||
|
});
|
||||||
|
|
||||||
window.closed.connect(function () { Script.stop(); });
|
window.closed.connect(function () { Script.stop(); });
|
||||||
|
|
||||||
function shouldLogMessage(scriptFileName) {
|
function shouldLogMessage(scriptFileName) {
|
||||||
|
|
Loading…
Reference in a new issue