diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-27 10:22:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 10:22:24 +0200 |
commit | 2893b5a6bee1f1185c52d4a46734b2741acbb52c (patch) | |
tree | 1228c093b29a091110bf3a90d38f8bb2db79050b | |
parent | 9108b5fba5b325ba0dc4731d2623645c9a1d40a1 (diff) | |
parent | ea63c9a87011ac094acdfc5df51462fd2ad5c01c (diff) |
Merge pull request #22464 from akien-mga/inspector-text-wrap
Inspector: Enable wrap for multiline text widget
-rw-r--r-- | editor/editor_properties.cpp | 2 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 3439133809..8df49b4516 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -108,6 +108,7 @@ void EditorPropertyMultilineText::_open_big_text() { if (!big_text_dialog) { big_text = memnew(TextEdit); big_text->connect("text_changed", this, "_big_text_changed"); + big_text->set_wrap_enabled(true); big_text_dialog = memnew(AcceptDialog); big_text_dialog->add_child(big_text); big_text_dialog->set_title("Edit Text:"); @@ -152,6 +153,7 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() { set_bottom_editor(hb); text = memnew(TextEdit); text->connect("text_changed", this, "_text_changed"); + text->set_wrap_enabled(true); add_focusable(text); hb->add_child(text); text->set_h_size_flags(SIZE_EXPAND_FILL); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 1069470ed3..81f1ee67c5 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2237,7 +2237,7 @@ void RichTextLabel::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta_underlined"), "set_meta_underline", "is_meta_underlined"); ADD_PROPERTY(PropertyInfo(Variant::INT, "tab_size", PROPERTY_HINT_RANGE, "0,24,1"), "set_tab_size", "get_tab_size"); - ADD_PROPERTY(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_active"), "set_scroll_active", "is_scroll_active"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "scroll_following"), "set_scroll_follow", "is_scroll_following"); |