1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Improvements to Label's layout options

- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
This commit is contained in:
Hendrik Brucker
2021-07-04 16:43:55 +02:00
parent cb4e42155d
commit 56a8d3f30c
24 changed files with 564 additions and 43 deletions

View File

@@ -148,11 +148,11 @@ bool AcceptDialog::get_hide_on_ok() const {
}
void AcceptDialog::set_autowrap(bool p_autowrap) {
label->set_autowrap(p_autowrap);
label->set_autowrap_mode(p_autowrap ? Label::AUTOWRAP_WORD : Label::AUTOWRAP_OFF);
}
bool AcceptDialog::has_autowrap() {
return label->has_autowrap();
return label->get_autowrap_mode() != Label::AUTOWRAP_OFF;
}
void AcceptDialog::register_text_enter(Control *p_line_edit) {