mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:29:01 +02:00
update qml file to show the current OpenVr headset
This commit is contained in:
parent
1bae22fed0
commit
95e14446dd
3 changed files with 13 additions and 11 deletions
|
@ -17,6 +17,7 @@ StackView {
|
||||||
id: stack
|
id: stack
|
||||||
initialItem: inputConfiguration
|
initialItem: inputConfiguration
|
||||||
property alias messageVisible: imageMessageBox.visible
|
property alias messageVisible: imageMessageBox.visible
|
||||||
|
property alias selectedPlugin: box.currentText
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: inputConfiguration
|
id: inputConfiguration
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -36,7 +36,7 @@ Rectangle {
|
||||||
readonly property bool hmdHead: headBox.checked
|
readonly property bool hmdHead: headBox.checked
|
||||||
readonly property bool headPuck: headPuckBox.checked
|
readonly property bool headPuck: headPuckBox.checked
|
||||||
readonly property bool handController: handBox.checked
|
readonly property bool handController: handBox.checked
|
||||||
|
|
||||||
readonly property bool handPuck: handPuckBox.checked
|
readonly property bool handPuck: handPuckBox.checked
|
||||||
readonly property bool hmdDesktop: hmdInDesktop.checked
|
readonly property bool hmdDesktop: hmdInDesktop.checked
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ Rectangle {
|
||||||
|
|
||||||
RalewayBold {
|
RalewayBold {
|
||||||
size: 12
|
size: 12
|
||||||
text: "Vive HMD"
|
text: stack.selectedPlugin + " HMD"
|
||||||
color: hifi.colors.lightGrayText
|
color: hifi.colors.lightGrayText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ Rectangle {
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
anchors.left: openVrConfiguration.left
|
anchors.left: openVrConfiguration.left
|
||||||
anchors.leftMargin: leftMargin + 10
|
anchors.leftMargin: leftMargin + 10
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
headBox.checked = false;
|
headBox.checked = false;
|
||||||
|
@ -778,12 +778,12 @@ Rectangle {
|
||||||
|
|
||||||
RalewayBold {
|
RalewayBold {
|
||||||
id: advanceSettings
|
id: advanceSettings
|
||||||
|
|
||||||
text: "Advanced Settings"
|
text: "Advanced Settings"
|
||||||
size: 12
|
size: 12
|
||||||
|
|
||||||
color: hifi.colors.white
|
color: hifi.colors.white
|
||||||
|
|
||||||
anchors.top: advanceSeperator.bottom
|
anchors.top: advanceSeperator.bottom
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -801,7 +801,7 @@ Rectangle {
|
||||||
anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
anchors.left: openVrConfiguration.left
|
anchors.left: openVrConfiguration.left
|
||||||
anchors.leftMargin: leftMargin + 10
|
anchors.leftMargin: leftMargin + 10
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!checked & hmdInDesktop.checked) {
|
if (!checked & hmdInDesktop.checked) {
|
||||||
headBox.checked = true;
|
headBox.checked = true;
|
||||||
|
@ -815,9 +815,9 @@ Rectangle {
|
||||||
RalewayBold {
|
RalewayBold {
|
||||||
id: viveDesktopText
|
id: viveDesktopText
|
||||||
size: 10
|
size: 10
|
||||||
text: "Use Vive devices in desktop mode"
|
text: "Use " + stack.selectedPlugin + " devices in desktop mode"
|
||||||
color: hifi.colors.white
|
color: hifi.colors.white
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
left: viveInDesktop.right
|
left: viveInDesktop.right
|
||||||
leftMargin: 5
|
leftMargin: 5
|
||||||
|
@ -825,7 +825,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: numberAnimation
|
id: numberAnimation
|
||||||
target: openVrConfiguration
|
target: openVrConfiguration
|
||||||
|
|
|
@ -32,7 +32,8 @@ QStringList InputConfiguration::inputPlugins() {
|
||||||
for (auto plugin : PluginManager::getInstance()->getInputPlugins()) {
|
for (auto plugin : PluginManager::getInstance()->getInputPlugins()) {
|
||||||
QString pluginName = plugin->getName();
|
QString pluginName = plugin->getName();
|
||||||
if (pluginName == QString("OpenVR")) {
|
if (pluginName == QString("OpenVR")) {
|
||||||
inputPlugins << QString("Vive");
|
QString headsetName = plugin->getDeviceName();
|
||||||
|
inputPlugins << headsetName;
|
||||||
} else {
|
} else {
|
||||||
inputPlugins << pluginName;
|
inputPlugins << pluginName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue