mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 22:42:20 +02:00
Merge pull request #15745 from PrestonB1123/hudRemnant
BUGZ-355: Persistent UI Element
This commit is contained in:
commit
5077ae1bd7
1 changed files with 10 additions and 3 deletions
|
@ -457,9 +457,16 @@ function onGeometryChanged(rect) {
|
|||
}
|
||||
}
|
||||
|
||||
function ensureFirstPersonCameraInHMD(isHMDMode) {
|
||||
var TIMEOUT_BEFORE_REHIDE_TOOLBAR_MS = 700;
|
||||
function onDisplayModeChanged(isHMDMode) {
|
||||
if (isHMDMode) {
|
||||
Camera.setModeString("first person");
|
||||
} else if (Settings.getValue("simplifiedUI/keepExistingUIAndScripts", false)) {
|
||||
// works for now, but not a permanent fix by any means.
|
||||
Script.setTimeout(function () {
|
||||
var toolbar = Toolbars.getToolbar(TOOLBAR_NAME);
|
||||
toolbar.writeProperty("visible", false);
|
||||
}, TIMEOUT_BEFORE_REHIDE_TOOLBAR_MS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -505,7 +512,7 @@ function startup() {
|
|||
updateOutputDeviceMutedOverlay(isOutputMuted());
|
||||
Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged);
|
||||
Window.geometryChanged.connect(onGeometryChanged);
|
||||
HMD.displayModeChanged.connect(ensureFirstPersonCameraInHMD);
|
||||
HMD.displayModeChanged.connect(onDisplayModeChanged);
|
||||
Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
|
||||
Audio.localInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
|
||||
Audio.serverInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
|
||||
|
@ -561,7 +568,7 @@ function shutdown() {
|
|||
|
||||
Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged);
|
||||
Window.geometryChanged.disconnect(onGeometryChanged);
|
||||
HMD.displayModeChanged.disconnect(ensureFirstPersonCameraInHMD);
|
||||
HMD.displayModeChanged.disconnect(onDisplayModeChanged);
|
||||
Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
|
||||
Audio.localInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
|
||||
Audio.serverInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
|
||||
|
|
Loading…
Reference in a new issue