diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-12-05 14:28:32 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-12-06 12:14:49 +0200 |
commit | ad4408d4134a17b9c74c9772ee1d29f463d9f4cb (patch) | |
tree | d75c88df791f811462f565d6c41d84bf38c7b27b /scene/gui/label.h | |
parent | 3a7d5a1c64fa6e5a46b49101f3c04104ad9b954b (diff) | |
download | redot-engine-ad4408d4134a17b9c74c9772ee1d29f463d9f4cb.tar.gz |
Add different "visible characters" behavior modes.
Diffstat (limited to 'scene/gui/label.h')
-rw-r--r-- | scene/gui/label.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/gui/label.h b/scene/gui/label.h index 8b48eb9670..d77488e7ed 100644 --- a/scene/gui/label.h +++ b/scene/gui/label.h @@ -66,6 +66,14 @@ public: OVERRUN_TRIM_WORD_ELLIPSIS, }; + enum VisibleCharactersBehavior { + VC_CHARS_BEFORE_SHAPING, + VC_CHARS_AFTER_SHAPING, + VC_GLYPHS_AUTO, + VC_GLYPHS_LTR, + VC_GLYPHS_RTL, + }; + private: Align align = ALIGN_LEFT; VAlign valign = VALIGN_TOP; @@ -90,6 +98,7 @@ private: float percent_visible = 1.0; + VisibleCharactersBehavior visible_chars_behavior = VC_CHARS_BEFORE_SHAPING; int visible_chars = -1; int lines_skipped = 0; int max_lines_visible = -1; @@ -140,6 +149,9 @@ public: void set_uppercase(bool p_uppercase); bool is_uppercase() const; + VisibleCharactersBehavior get_visible_characters_behavior() const; + void set_visible_characters_behavior(VisibleCharactersBehavior p_behavior); + void set_visible_characters(int p_amount); int get_visible_characters() const; int get_total_character_count() const; @@ -171,5 +183,6 @@ VARIANT_ENUM_CAST(Label::Align); VARIANT_ENUM_CAST(Label::VAlign); VARIANT_ENUM_CAST(Label::AutowrapMode); VARIANT_ENUM_CAST(Label::OverrunBehavior); +VARIANT_ENUM_CAST(Label::VisibleCharactersBehavior); #endif |