diff options
author | Tomasz Chabora <kobewi4e@gmail.com> | 2020-01-29 19:56:03 +0100 |
---|---|---|
committer | Tomasz Chabora <kobewi4e@gmail.com> | 2020-01-29 19:56:06 +0100 |
commit | 7a0e813ffaed8c72917e0183eb430323666d3f21 (patch) | |
tree | 959d10e81e576cca2b2f4e4ff29aa604ab2c8d7c | |
parent | 6fcb58f40dae8228074591e3262d5db97db3e2d7 (diff) |
Show theme property descriptions in the inspector
-rw-r--r-- | editor/editor_inspector.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 56da7d93fa..2cb1f4ad38 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1687,6 +1687,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 { |