|
@@ -91,6 +91,10 @@ void EditorPropertyText::_text_changed(const String &p_string) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // Set tooltip so that the full text is displayed in a tooltip if hovered.
|
|
|
|
+ // This is useful when using a narrow inspector, as the text can be trimmed otherwise.
|
|
|
|
+ text->set_tooltip_text(get_tooltip_string(text->get_text()));
|
|
|
|
+
|
|
if (string_name) {
|
|
if (string_name) {
|
|
emit_changed(get_edited_property(), StringName(p_string));
|
|
emit_changed(get_edited_property(), StringName(p_string));
|
|
} else {
|
|
} else {
|
|
@@ -104,6 +108,7 @@ void EditorPropertyText::update_property() {
|
|
if (text->get_text() != s) {
|
|
if (text->get_text() != s) {
|
|
int caret = text->get_caret_column();
|
|
int caret = text->get_caret_column();
|
|
text->set_text(s);
|
|
text->set_text(s);
|
|
|
|
+ text->set_tooltip_text(get_tooltip_string(s));
|
|
text->set_caret_column(caret);
|
|
text->set_caret_column(caret);
|
|
}
|
|
}
|
|
text->set_editable(!is_read_only());
|
|
text->set_editable(!is_read_only());
|
|
@@ -150,10 +155,14 @@ void EditorPropertyMultilineText::_set_read_only(bool p_read_only) {
|
|
|
|
|
|
void EditorPropertyMultilineText::_big_text_changed() {
|
|
void EditorPropertyMultilineText::_big_text_changed() {
|
|
text->set_text(big_text->get_text());
|
|
text->set_text(big_text->get_text());
|
|
|
|
+ // Set tooltip so that the full text is displayed in a tooltip if hovered.
|
|
|
|
+ // This is useful when using a narrow inspector, as the text can be trimmed otherwise.
|
|
|
|
+ text->set_tooltip_text(get_tooltip_string(big_text->get_text()));
|
|
emit_changed(get_edited_property(), big_text->get_text(), "", true);
|
|
emit_changed(get_edited_property(), big_text->get_text(), "", true);
|
|
}
|
|
}
|
|
|
|
|
|
void EditorPropertyMultilineText::_text_changed() {
|
|
void EditorPropertyMultilineText::_text_changed() {
|
|
|
|
+ text->set_tooltip_text(get_tooltip_string(text->get_text()));
|
|
emit_changed(get_edited_property(), text->get_text(), "", true);
|
|
emit_changed(get_edited_property(), text->get_text(), "", true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -182,6 +191,7 @@ void EditorPropertyMultilineText::update_property() {
|
|
String t = get_edited_property_value();
|
|
String t = get_edited_property_value();
|
|
if (text->get_text() != t) {
|
|
if (text->get_text() != t) {
|
|
text->set_text(t);
|
|
text->set_text(t);
|
|
|
|
+ text->set_tooltip_text(get_tooltip_string(t));
|
|
if (big_text && big_text->is_visible_in_tree()) {
|
|
if (big_text && big_text->is_visible_in_tree()) {
|
|
big_text->set_text(t);
|
|
big_text->set_text(t);
|
|
}
|
|
}
|