update qml file to show the current OpenVr headset

This commit is contained in:
Dante Ruiz 2018-03-01 09:03:52 -08:00
parent 1bae22fed0
commit 95e14446dd
3 changed files with 13 additions and 11 deletions

View file

@ -17,6 +17,7 @@ StackView {
id: stack
initialItem: inputConfiguration
property alias messageVisible: imageMessageBox.visible
property alias selectedPlugin: box.currentText
Rectangle {
id: inputConfiguration
anchors.fill: parent

View file

@ -36,7 +36,7 @@ Rectangle {
readonly property bool hmdHead: headBox.checked
readonly property bool headPuck: headPuckBox.checked
readonly property bool handController: handBox.checked
readonly property bool handPuck: handPuckBox.checked
readonly property bool hmdDesktop: hmdInDesktop.checked
@ -107,7 +107,7 @@ Rectangle {
RalewayBold {
size: 12
text: "Vive HMD"
text: stack.selectedPlugin + " HMD"
color: hifi.colors.lightGrayText
}
@ -145,7 +145,7 @@ Rectangle {
anchors.topMargin: 5
anchors.left: openVrConfiguration.left
anchors.leftMargin: leftMargin + 10
onClicked: {
if (checked) {
headBox.checked = false;
@ -778,12 +778,12 @@ Rectangle {
RalewayBold {
id: advanceSettings
text: "Advanced Settings"
size: 12
color: hifi.colors.white
anchors.top: advanceSeperator.bottom
anchors.topMargin: 10
anchors.left: parent.left
@ -801,7 +801,7 @@ Rectangle {
anchors.topMargin: 5
anchors.left: openVrConfiguration.left
anchors.leftMargin: leftMargin + 10
onClicked: {
if (!checked & hmdInDesktop.checked) {
headBox.checked = true;
@ -815,9 +815,9 @@ Rectangle {
RalewayBold {
id: viveDesktopText
size: 10
text: "Use Vive devices in desktop mode"
text: "Use " + stack.selectedPlugin + " devices in desktop mode"
color: hifi.colors.white
anchors {
left: viveInDesktop.right
leftMargin: 5
@ -825,7 +825,7 @@ Rectangle {
}
}
NumberAnimation {
id: numberAnimation
target: openVrConfiguration

View file

@ -32,7 +32,8 @@ QStringList InputConfiguration::inputPlugins() {
for (auto plugin : PluginManager::getInstance()->getInputPlugins()) {
QString pluginName = plugin->getName();
if (pluginName == QString("OpenVR")) {
inputPlugins << QString("Vive");
QString headsetName = plugin->getDeviceName();
inputPlugins << headsetName;
} else {
inputPlugins << pluginName;
}