diff --git a/interface/resources/qml/hifi/tablet/tabletWindows/TabletPreferencesDialog.qml b/interface/resources/qml/hifi/tablet/tabletWindows/TabletPreferencesDialog.qml index ec2c003383..f2379cce7a 100644 --- a/interface/resources/qml/hifi/tablet/tabletWindows/TabletPreferencesDialog.qml +++ b/interface/resources/qml/hifi/tablet/tabletWindows/TabletPreferencesDialog.qml @@ -122,6 +122,14 @@ Item { } } + // Runtime customization of preferences. + if (HMD.isHeadControllerAvailable("Oculus")) { + var preference = findPreference("VR Movement", "Show room boundaries while teleporting"); + if (preference) { + preference.label = "Show room boundaries and sensors while teleporting"; + } + } + if (sections.length) { // Default sections to expanded/collapsed as appropriate for dialog. if (sections.length === 1) { @@ -234,4 +242,32 @@ Item { } } } + + function findPreference(category, name) { + var section = null; + var preference = null; + var i; + + // Find category section. + i = 0; + while (!section && i < sections.length) { + if (sections[i].name === category) { + section = sections[i]; + } + i++; + } + + // Find named preference. + if (section) { + i = 0; + while (!preference && i < section.preferences.length) { + if (section.preferences[i].preference && section.preferences[i].preference.name === name) { + preference = section.preferences[i]; + } + i++; + } + } + + return preference; + } }