mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Improvements to switch; switch settings persist
This commit is contained in:
parent
afb7e72b25
commit
ca05e3d0b6
3 changed files with 15 additions and 9 deletions
|
@ -85,7 +85,7 @@ Item {
|
||||||
id: labelOff;
|
id: labelOff;
|
||||||
text: labelTextOff;
|
text: labelTextOff;
|
||||||
size: hifi.fontSizes.inputLabel;
|
size: hifi.fontSizes.inputLabel;
|
||||||
color: hifi.colors.lightGrayText;
|
color: originalSwitch.checked ? hifi.colors.lightGrayText : hifi.colors.faintGray;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
|
@ -97,7 +97,7 @@ Item {
|
||||||
id: labelGlyphOff;
|
id: labelGlyphOff;
|
||||||
text: labelGlyphOffText;
|
text: labelGlyphOffText;
|
||||||
size: labelGlyphOffSize;
|
size: labelGlyphOffSize;
|
||||||
color: hifi.colors.lightGrayText;
|
color: labelOff.color;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 2;
|
anchors.topMargin: 2;
|
||||||
anchors.right: labelOff.left;
|
anchors.right: labelOff.left;
|
||||||
|
@ -126,7 +126,7 @@ Item {
|
||||||
id: labelOn;
|
id: labelOn;
|
||||||
text: labelTextOn;
|
text: labelTextOn;
|
||||||
size: hifi.fontSizes.inputLabel;
|
size: hifi.fontSizes.inputLabel;
|
||||||
color: hifi.colors.lightGrayText;
|
color: originalSwitch.checked ? hifi.colors.faintGray : hifi.colors.lightGrayText;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
|
@ -138,7 +138,7 @@ Item {
|
||||||
id: labelGlyphOn;
|
id: labelGlyphOn;
|
||||||
text: labelGlyphOnText;
|
text: labelGlyphOnText;
|
||||||
size: labelGlyphOnSize;
|
size: labelGlyphOnSize;
|
||||||
color: hifi.colors.lightGrayText;
|
color: labelOn.color;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: labelOn.right;
|
anchors.left: labelOn.right;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ Rectangle {
|
||||||
// "Spectator" app description text
|
// "Spectator" app description text
|
||||||
RalewayLight {
|
RalewayLight {
|
||||||
id: spectatorDescriptionText;
|
id: spectatorDescriptionText;
|
||||||
text: "Spectator lets you switch what your monitor displays while you're using an HMD. Use Spectator to stream and record video.";
|
text: "Spectator lets you change what your monitor displays while you're using an HMD. Use Spectator when streaming and recording video.";
|
||||||
// Text size
|
// Text size
|
||||||
size: 14;
|
size: 14;
|
||||||
// Size
|
// Size
|
||||||
|
@ -244,7 +244,7 @@ Rectangle {
|
||||||
labelTextOn: "Camera View";
|
labelTextOn: "Camera View";
|
||||||
labelGlyphOnText: hifi.glyphs.alert;
|
labelGlyphOnText: hifi.glyphs.alert;
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
sendToScript({method: (checked ? 'showCameraViewOnMonitor' : 'showMyViewOnMonitor')});
|
sendToScript({method: (checked ? 'showCameraViewOnMonitor' : 'showHmdPreviewOnMonitor')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,6 +287,9 @@ Rectangle {
|
||||||
case 'updateSpectatorCameraCheckbox':
|
case 'updateSpectatorCameraCheckbox':
|
||||||
cameraToggleCheckBox.checked = message.params;
|
cameraToggleCheckBox.checked = message.params;
|
||||||
break;
|
break;
|
||||||
|
case 'updateMonitorShowsSwitch':
|
||||||
|
monitorShowsSwitch.checked = message.params;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('Unrecognized message from spectatorCamera.js:', JSON.stringify(message));
|
console.log('Unrecognized message from spectatorCamera.js:', JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,6 +223,7 @@
|
||||||
tablet.loadQMLSource("../SpectatorCamera.qml");
|
tablet.loadQMLSource("../SpectatorCamera.qml");
|
||||||
onSpectatorCameraScreen = true;
|
onSpectatorCameraScreen = true;
|
||||||
sendToQml({ method: 'updateSpectatorCameraCheckbox', params: !!camera });
|
sendToQml({ method: 'updateSpectatorCameraCheckbox', params: !!camera });
|
||||||
|
sendToQml({ method: 'updateMonitorShowsSwitch', params: !!Settings.getValue('spectatorCamera/monitorShowsCameraView', false) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,11 +286,13 @@
|
||||||
case 'disableSpectatorCamera':
|
case 'disableSpectatorCamera':
|
||||||
disableSpectatorCamera();
|
disableSpectatorCamera();
|
||||||
break;
|
break;
|
||||||
|
case 'showHmdPreviewOnMonitor':
|
||||||
|
print('FIXME: showHmdPreviewOnMonitor');
|
||||||
|
Settings.setValue('spectatorCamera/monitorShowsCameraView', false);
|
||||||
|
break;
|
||||||
case 'showCameraViewOnMonitor':
|
case 'showCameraViewOnMonitor':
|
||||||
print('FIXME: showCameraViewOnMonitor');
|
print('FIXME: showCameraViewOnMonitor');
|
||||||
break;
|
Settings.setValue('spectatorCamera/monitorShowsCameraView', true);
|
||||||
case 'showMyViewOnMonitor':
|
|
||||||
print('FIXME: showMyViewOnMonitor');
|
|
||||||
break;
|
break;
|
||||||
case 'changeSwitchViewFromControllerPreference':
|
case 'changeSwitchViewFromControllerPreference':
|
||||||
print('FIXME: Preference is now: ' + message.params);
|
print('FIXME: Preference is now: ' + message.params);
|
||||||
|
|
Loading…
Reference in a new issue