1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Reworked tooltips to use the popup system.

This commit is contained in:
Juan Linietsky
2020-03-20 17:51:53 -03:00
parent b3080bc2f4
commit 047e0b7de5
15 changed files with 149 additions and 65 deletions

View File

@@ -1610,6 +1610,11 @@ void EditorHelpBit::_bind_methods() {
void EditorHelpBit::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
rich_text->clear();
_add_text_to_rt(text, rich_text);
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
rich_text->add_theme_color_override("selection_color", get_theme_color("accent_color", "Editor") * Color(1, 1, 1, 0.4));
@@ -1620,8 +1625,9 @@ void EditorHelpBit::_notification(int p_what) {
void EditorHelpBit::set_text(const String &p_text) {
text = p_text;
rich_text->clear();
_add_text_to_rt(p_text, rich_text);
_add_text_to_rt(text, rich_text);
}
EditorHelpBit::EditorHelpBit() {