mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
Add necessary button protection
This commit is contained in:
parent
60751f07bd
commit
2c94917fb8
1 changed files with 4 additions and 3 deletions
|
@ -109,12 +109,13 @@
|
||||||
// from the "Window.domainChanged()" signal.
|
// from the "Window.domainChanged()" signal.
|
||||||
var WAIT_AFTER_DOMAIN_SWITCH_BEFORE_CAMERA_DELETE_MS = 1 * 1000;
|
var WAIT_AFTER_DOMAIN_SWITCH_BEFORE_CAMERA_DELETE_MS = 1 * 1000;
|
||||||
function spectatorCameraOff(isChangingDomains) {
|
function spectatorCameraOff(isChangingDomains) {
|
||||||
|
|
||||||
function deleteCamera() {
|
function deleteCamera() {
|
||||||
Entities.deleteEntity(camera);
|
Entities.deleteEntity(camera);
|
||||||
camera = false;
|
camera = false;
|
||||||
// Change button to active when window is first openend OR if the camera is on, false otherwise.
|
if (button) {
|
||||||
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
// Change button to active when window is first openend OR if the camera is on, false otherwise.
|
||||||
|
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spectatorCameraConfig.attachedEntityId = false;
|
spectatorCameraConfig.attachedEntityId = false;
|
||||||
|
|
Loading…
Reference in a new issue