Add properties to configure space trimming on line break.

This commit is contained in:
Pāvels Nadtočajevs 2025-03-16 13:57:01 +02:00
parent fde0616a0e
commit 2bbf0f2317
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
18 changed files with 171 additions and 30 deletions

View file

@ -45,6 +45,7 @@ private:
String language;
TextDirection text_direction = TEXT_DIRECTION_AUTO;
TextServer::AutowrapMode autowrap_mode = TextServer::AUTOWRAP_OFF;
BitField<TextServer::LineBreakFlag> autowrap_flags_trim = TextServer::BREAK_TRIM_END_EDGE_SPACES;
TextServer::OverrunBehavior overrun_behavior = TextServer::OVERRUN_NO_TRIMMING;
Ref<Texture2D> icon;
@ -131,6 +132,9 @@ public:
void set_autowrap_mode(TextServer::AutowrapMode p_mode);
TextServer::AutowrapMode get_autowrap_mode() const;
void set_autowrap_trim_flags(BitField<TextServer::LineBreakFlag> p_flags);
BitField<TextServer::LineBreakFlag> get_autowrap_trim_flags() const;
void set_text_direction(TextDirection p_text_direction);
TextDirection get_text_direction() const;