From 5ab22a1f403d8aa7b110e5105881c704a64fc3ed Mon Sep 17 00:00:00 2001
From: David Rowe <david@ctrlaltstudio.com>
Date: Thu, 27 Sep 2018 17:07:42 +1200
Subject: [PATCH] Change play area option text for Oculus

---
 .../tabletWindows/TabletPreferencesDialog.qml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)

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;
+    }
 }