diff options
| author | Danil Alexeev <danil@alexeev.xyz> | 2024-04-11 11:21:44 +0300 |
|---|---|---|
| committer | Danil Alexeev <danil@alexeev.xyz> | 2024-04-18 14:32:04 +0300 |
| commit | a714cb9f65faefaa21bef240397ca6d249edd53c (patch) | |
| tree | 9ce34904d2641410dafd914d9f816df99e21b5b5 /editor/plugins | |
| parent | 3b1806182a3564736ad64793b203c2c13c251f56 (diff) | |
| download | redot-engine-a714cb9f65faefaa21bef240397ca6d249edd53c.tar.gz | |
Editor: Display deprecated/experimental messages in tooltips
Diffstat (limited to 'editor/plugins')
| -rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 8 | ||||
| -rw-r--r-- | editor/plugins/theme_editor_plugin.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 0db752e771..166ed05748 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -2267,7 +2267,9 @@ ThemeTypeDialog::ThemeTypeDialog() { /////////////////////// Control *ThemeItemLabel::make_custom_tooltip(const String &p_text) const { - return memnew(EditorHelpTooltip(p_text)); + EditorHelpBit *help_bit = memnew(EditorHelpBit(p_text)); + EditorHelpBitTooltip::show_tooltip(help_bit, const_cast<ThemeItemLabel *>(this)); + return memnew(Control); // Make the standard tooltip invisible. } VBoxContainer *ThemeTypeEditor::_create_item_list(Theme::DataType p_data_type) { @@ -2436,8 +2438,8 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_ item_name->set_h_size_flags(SIZE_EXPAND_FILL); item_name->set_clip_text(true); item_name->set_text(p_item_name); - // `|` separators used in `EditorHelpTooltip` for formatting. - item_name->set_tooltip_text("theme_item|" + edited_type + "|" + p_item_name + "|"); + // `|` separators used in `EditorHelpBit`. + item_name->set_tooltip_text("theme_item|" + edited_type + "|" + p_item_name); item_name->set_mouse_filter(Control::MOUSE_FILTER_STOP); item_name_container->add_child(item_name); diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h index ba3446807e..0bc02789aa 100644 --- a/editor/plugins/theme_editor_plugin.h +++ b/editor/plugins/theme_editor_plugin.h @@ -321,7 +321,7 @@ public: ThemeTypeDialog(); }; -// Custom `Label` needed to use `EditorHelpTooltip` to display theme item documentation. +// Custom `Label` needed to use `EditorHelpBit` to display theme item documentation. class ThemeItemLabel : public Label { virtual Control *make_custom_tooltip(const String &p_text) const; }; |
