Merge pull request #16247 from MiladNazeri/DEV-148/add-mirror-mode-to-settings

Dev 148/add mirror mode to settings
This commit is contained in:
MiladNazeri 2019-09-25 12:08:09 -07:00 committed by GitHub
commit 7d7024f5eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 7 deletions

View file

@ -699,8 +699,8 @@ Item {
spacing: controlsTableRoot.rowPadding
HifiStylesUit.GraphikRegular {
id: mirrorText
text: "Mirror Mode"
id: selfieText
text: "Selfie"
width: paintedWidth
height: parent.height
horizontalAlignment: Text.AlignLeft
@ -710,8 +710,8 @@ Item {
}
HifiStylesUit.GraphikRegular {
text: "See your own avatar"
width: parent.width - mirrorText.width - parent.spacing - controlsTableRoot.rowPadding
text: "Look at self"
width: parent.width - selfieText.width - parent.spacing - controlsTableRoot.rowPadding
height: parent.height
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter

View file

@ -234,9 +234,19 @@ Flickable {
SimplifiedControls.RadioButton {
id: thirdPerson
text: "Third Person View"
checked: Camera.mode === "third person"
checked: Camera.mode === "look at"
onClicked: {
Camera.mode = "third person"
Camera.mode = "look at"
}
}
SimplifiedControls.RadioButton {
id: selfie
text: "Selfie"
checked: Camera.mode === "selfie"
visible: true
onClicked: {
Camera.mode = "selfie"
}
}
@ -246,11 +256,21 @@ Flickable {
onModeUpdated: {
if (Camera.mode === "first person") {
firstPerson.checked = true
} else if (Camera.mode === "third person") {
} else if (Camera.mode === "look at") {
thirdPerson.checked = true
} else if (Camera.mode === "selfie" && HMD.active) {
selfie.checked = true
}
}
}
Connections {
target: HMD
onDisplayModeChanged: {
selfie.visible = isHMDMode ? false : true
}
}
}
}