summaryrefslogtreecommitdiffstats
path: root/scene/gui/label.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-12-23 00:43:33 +0100
committerGitHub <noreply@github.com>2021-12-23 00:43:33 +0100
commit1906b59675ce807d3be35924a1b4338976061e0f (patch)
tree38fc7e228cdd2b97142f4def8df0b46c1489560d /scene/gui/label.h
parent650b77340dcf1e20c744c941ec07b596fc37974f (diff)
parentad4408d4134a17b9c74c9772ee1d29f463d9f4cb (diff)
downloadredot-engine-1906b59675ce807d3be35924a1b4338976061e0f.tar.gz
Merge pull request #55636 from bruvzg/vis_char_modes
Add different "visible characters" behavior modes.
Diffstat (limited to 'scene/gui/label.h')
-rw-r--r--scene/gui/label.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/gui/label.h b/scene/gui/label.h
index 2ad8ae8818..43c6bf6e89 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -52,6 +52,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:
HorizontalAlignment horizontal_alignment = HORIZONTAL_ALIGNMENT_LEFT;
VerticalAlignment vertical_alignment = VERTICAL_ALIGNMENT_TOP;
@@ -76,6 +84,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;
@@ -126,6 +135,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;
@@ -155,5 +167,6 @@ public:
VARIANT_ENUM_CAST(Label::AutowrapMode);
VARIANT_ENUM_CAST(Label::OverrunBehavior);
+VARIANT_ENUM_CAST(Label::VisibleCharactersBehavior);
#endif