diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-13 14:12:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 14:12:53 +0200 |
commit | 9b29f1863163a20b8fb05b3e260c11365c7cd25b (patch) | |
tree | 28aa82e0da33b0ce973cf5552f1abb19fac4e27d /editor/editor_inspector.h | |
parent | 200009cd48600331dff60866b00d3e7e1016dfc0 (diff) | |
parent | dcf42cff86e0577d87484613d0915256b7491fcc (diff) |
Merge pull request #59680 from fire-forge/property-help
Add "Open Documentation" button to EditorProperty context menu
Diffstat (limited to 'editor/editor_inspector.h')
-rw-r--r-- | editor/editor_inspector.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index d70d06c48b..9542f102cb 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -62,6 +62,7 @@ public: MENU_PASTE_PROPERTY, MENU_COPY_PROPERTY_PATH, MENU_PIN_VALUE, + MENU_OPEN_DOCUMENTATION, }; private: @@ -71,6 +72,7 @@ private: Object *object = nullptr; StringName property; String property_path; + String doc_path; int property_usage; @@ -148,6 +150,8 @@ public: Object *get_edited_object(); StringName get_edited_property() const; + void set_doc_path(const String &p_doc_path); + virtual void update_property(); void update_revert_and_pin_status(); @@ -439,7 +443,7 @@ class EditorInspector : public ScrollContainer { VBoxContainer *main_vbox = nullptr; - //map use to cache the instantiated editors + // Map used to cache the instantiated editors. HashMap<StringName, List<EditorProperty *>> editor_property_map; List<EditorInspectorSection *> sections; HashSet<StringName> pending; @@ -473,7 +477,12 @@ class EditorInspector : public ScrollContainer { int property_focusable; int update_scroll_request; - HashMap<StringName, HashMap<StringName, String>> descr_cache; + struct PropertyDocInfo { + String description; + String path; + }; + + HashMap<StringName, HashMap<StringName, PropertyDocInfo>> doc_info_cache; HashMap<StringName, String> class_descr_cache; HashSet<StringName> restart_request_props; |