mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Editor: Display deprecated/experimental messages in tooltips
This commit is contained in:
parent
3b1806182a
commit
a714cb9f65
17 changed files with 819 additions and 380 deletions
|
@ -47,6 +47,7 @@
|
|||
#include "scene/gui/check_box.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/spin_box.h"
|
||||
|
@ -872,7 +873,13 @@ ConnectDialog::~ConnectDialog() {
|
|||
|
||||
Control *ConnectionsDockTree::make_custom_tooltip(const String &p_text) const {
|
||||
// If it's not a doc tooltip, fallback to the default one.
|
||||
return p_text.contains("::") ? nullptr : memnew(EditorHelpTooltip(p_text));
|
||||
if (p_text.contains("::")) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EditorHelpBit *help_bit = memnew(EditorHelpBit(p_text));
|
||||
EditorHelpBitTooltip::show_tooltip(help_bit, const_cast<ConnectionsDockTree *>(this));
|
||||
return memnew(Control); // Make the standard tooltip invisible.
|
||||
}
|
||||
|
||||
struct _ConnectionsDockMethodInfoSort {
|
||||
|
@ -1458,8 +1465,8 @@ void ConnectionsDock::update_tree() {
|
|||
|
||||
section_item = tree->create_item(root);
|
||||
section_item->set_text(0, class_name);
|
||||
// `|` separators used in `EditorHelpTooltip` for formatting.
|
||||
section_item->set_tooltip_text(0, "class|" + doc_class_name + "||");
|
||||
// `|` separators used in `EditorHelpBit`.
|
||||
section_item->set_tooltip_text(0, "class|" + doc_class_name + "|");
|
||||
section_item->set_icon(0, class_icon);
|
||||
section_item->set_selectable(0, false);
|
||||
section_item->set_editable(0, false);
|
||||
|
@ -1490,8 +1497,8 @@ void ConnectionsDock::update_tree() {
|
|||
sinfo["args"] = argnames;
|
||||
signal_item->set_metadata(0, sinfo);
|
||||
signal_item->set_icon(0, get_editor_theme_icon(SNAME("Signal")));
|
||||
// `|` separators used in `EditorHelpTooltip` for formatting.
|
||||
signal_item->set_tooltip_text(0, "signal|" + doc_class_name + "|" + String(signal_name) + "|" + signame.trim_prefix(mi.name));
|
||||
// `|` separators used in `EditorHelpBit`.
|
||||
signal_item->set_tooltip_text(0, "signal|" + doc_class_name + "|" + String(signal_name));
|
||||
|
||||
// List existing connections.
|
||||
List<Object::Connection> existing_connections;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue