mirror of
https://github.com/lubosz/overte.git
synced 2025-04-16 09:46:29 +02:00
Change play area option text for Oculus
This commit is contained in:
parent
3284b2a90e
commit
5ab22a1f40
1 changed files with 36 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue