fixing some issues

This commit is contained in:
Dante Ruiz 2018-06-04 16:09:31 -07:00
parent 48c0b7379a
commit f5e2a6834b
3 changed files with 8 additions and 4 deletions

View file

@ -171,6 +171,10 @@ FocusScope {
} }
} }
function textAt(index) {
return comboBox.textAt(index);
}
HifiControls.Label { HifiControls.Label {
id: comboBoxLabel id: comboBoxLabel
text: root.label text: root.label

View file

@ -174,7 +174,7 @@ Item {
text: "show all input devices" text: "show all input devices"
onClicked: { onClicked: {
inputPlugins(); box.model = inputPlugins();
changeSource(); changeSource();
} }
} }
@ -262,11 +262,12 @@ Item {
function changeSource() { function changeSource() {
loader.source = ""; loader.source = "";
var selectedDevice = box.textAt(box.currentIndex);
var source = ""; var source = "";
if (box.currentText == "Vive") { if (selectedDevice == "HTC Vive") {
source = InputConfiguration.configurationLayout("OpenVR"); source = InputConfiguration.configurationLayout("OpenVR");
} else { } else {
source = InputConfiguration.configurationLayout(box.currentText); source = InputConfiguration.configurationLayout(selectedDevice);
} }
loader.source = source; loader.source = source;

View file

@ -20,7 +20,6 @@ Flickable {
width: parent.width width: parent.width
height: parent.height height: parent.height
anchors.fill: parent anchors.fill: parent
contentWidth: openVrConfiguration.width
contentHeight: 550 contentHeight: 550
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick