[TextServer] Add support for trimming edge spaces on line break.

This commit is contained in:
bruvzg
2022-08-30 11:56:17 +03:00
parent 1c037c89d4
commit 7aad14a4b6
9 changed files with 124 additions and 21 deletions

View File

@ -544,7 +544,7 @@ void Button::_bind_methods() {
Button::Button(const String &p_text) {
text_buf.instantiate();
text_buf->set_break_flags(TextServer::BREAK_MANDATORY);
text_buf->set_break_flags(TextServer::BREAK_MANDATORY | TextServer::BREAK_TRIM_EDGE_SPACES);
set_mouse_filter(MOUSE_FILTER_STOP);
set_text(p_text);