summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-03-19 14:50:59 +0100
committerGitHub <noreply@github.com>2020-03-19 14:50:59 +0100
commit500086587ab450681bdfa8d03a11dbda6cfcfbf4 (patch)
tree940b4c8b12a02673328f782d521c2041c35f752a
parentaf0b7f90bcdf1fca334932be2888d30aaef7bb75 (diff)
parent7a0e813ffaed8c72917e0183eb430323666d3f21 (diff)
Merge pull request #35712 from KoBeWi/theheme_spy
Show theme property descriptions in the inspector
-rw-r--r--editor/editor_inspector.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index a7540bad10..fe3ed23dee 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1707,6 +1707,18 @@ void EditorInspector::update_tree() {
break;
}
}
+
+ Vector<String> slices = propname.operator String().split("/");
+ if (slices.size() == 2 && slices[0].begins_with("custom_")) {
+ // Likely a theme property.
+ for (int i = 0; i < F->get().theme_properties.size(); i++) {
+ if (F->get().theme_properties[i].name == slices[1]) {
+ descr = F->get().theme_properties[i].description.strip_edges();
+ break;
+ }
+ }
+ }
+
if (!F->get().inherits.empty()) {
F = dd->class_list.find(F->get().inherits);
} else {