From 810e914676dfb0a23ec7f0f015b7ec7e1092bcdc Mon Sep 17 00:00:00 2001 From: Priyansh Rathi Date: Fri, 11 Mar 2022 11:48:05 +0530 Subject: [PATCH] add descriptions for item properties in inspector --- editor/editor_inspector.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index d48ca7f3b3b..dd6617c7dbd 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2857,6 +2857,20 @@ void EditorInspector::update_tree() { break; } } + } else if (slices.size() == 2 && slices[0].begins_with("item_")) { + for (int i = 0; i < F->get().methods.size(); i++) { + if (F->get().methods[i].name == "set_item_" + slices[1]) { + descr = DTR(F->get().methods[i].description); + break; + } + } + } else if (slices.size() == 2 && slices[0].begins_with("tab_")) { + for (int i = 0; i < F->get().methods.size(); i++) { + if (F->get().methods[i].name == "set_tab_" + slices[1]) { + descr = DTR(F->get().methods[i].description); + break; + } + } } if (!F->get().inherits.is_empty()) {