mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-16 01:59:15 +02:00
Merge pull request #10936 from zfox23/spectatorCamera_activeButtonWhenOn
Make Spectator Camera icon active when Camera is on
This commit is contained in:
commit
5bec6cc7f5
1 changed files with 10 additions and 2 deletions
|
@ -100,6 +100,10 @@
|
|||
spectatorCameraConfig.attachedEntityId = camera;
|
||||
updateOverlay();
|
||||
setDisplay(monitorShowsCameraView);
|
||||
// Change button to active when window is first openend OR if the camera is on, false otherwise.
|
||||
if (button) {
|
||||
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
||||
}
|
||||
}
|
||||
|
||||
// Function Name: spectatorCameraOff()
|
||||
|
@ -119,6 +123,10 @@
|
|||
camera = false;
|
||||
viewFinderOverlay = false;
|
||||
setDisplay(monitorShowsCameraView);
|
||||
// Change button to active when window is first openend OR if the camera is on, false otherwise.
|
||||
if (button) {
|
||||
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
||||
}
|
||||
}
|
||||
|
||||
// Function Name: addOrRemoveButton()
|
||||
|
@ -402,9 +410,9 @@
|
|||
function onTabletScreenChanged(type, url) {
|
||||
onSpectatorCameraScreen = (type === "QML" && url === SPECTATOR_CAMERA_QML_SOURCE);
|
||||
wireEventBridge(onSpectatorCameraScreen);
|
||||
// for toolbar mode: change button to active when window is first openend, false otherwise.
|
||||
// Change button to active when window is first openend OR if the camera is on, false otherwise.
|
||||
if (button) {
|
||||
button.editProperties({ isActive: onSpectatorCameraScreen });
|
||||
button.editProperties({ isActive: onSpectatorCameraScreen || camera });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue