mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:31:13 +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) {
|
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