mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +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:
parent
cb4e42155d
commit
56a8d3f30c
24 changed files with 564 additions and 43 deletions
|
@ -3855,7 +3855,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
|
||||
error_label = memnew(Label);
|
||||
error_panel->add_child(error_label);
|
||||
error_label->set_autowrap(true);
|
||||
error_label->set_autowrap_mode(Label::AUTOWRAP_WORD_SMART);
|
||||
|
||||
///////////////////////////////////////
|
||||
// POPUP MENU
|
||||
|
@ -3941,7 +3941,7 @@ VisualShaderEditor::VisualShaderEditor() {
|
|||
add_child(members_dialog);
|
||||
|
||||
alert = memnew(AcceptDialog);
|
||||
alert->get_label()->set_autowrap(true);
|
||||
alert->get_label()->set_autowrap_mode(Label::AUTOWRAP_WORD);
|
||||
alert->get_label()->set_align(Label::ALIGN_CENTER);
|
||||
alert->get_label()->set_valign(Label::VALIGN_CENTER);
|
||||
alert->get_label()->set_custom_minimum_size(Size2(400, 60) * EDSCALE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue