summaryrefslogtreecommitdiffstats
path: root/scene/gui/label.h
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-08-20 20:06:13 +0200
committerMicky <micheledevita2@gmail.com>2022-08-26 12:15:57 +0200
commit64bd36ecee57b73ac698d6eb8a5065e03f3137f2 (patch)
tree4fff26279fcf1e0baa9c5748a0ef078172314edf /scene/gui/label.h
parent9876382df8c0fcb7880ca20b053d1f2b2a358785 (diff)
downloadredot-engine-64bd36ecee57b73ac698d6eb8a5065e03f3137f2.tar.gz
Rename Label & RichTextLabel.`percent_visible` to `visible_ratio`
Also updates the documentation of both `visible_characters` and `visible_ratio` to, better describe what they do and improve consistency between the two Classes.
Diffstat (limited to 'scene/gui/label.h')
-rw-r--r--scene/gui/label.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/scene/gui/label.h b/scene/gui/label.h
index cab5b36d68..65831cab6e 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -59,10 +59,9 @@ private:
TextServer::StructuredTextParser st_parser = TextServer::STRUCTURED_TEXT_DEFAULT;
Array st_args;
- float percent_visible = 1.0;
-
TextServer::VisibleCharactersBehavior visible_chars_behavior = TextServer::VC_CHARS_BEFORE_SHAPING;
int visible_chars = -1;
+ float visible_ratio = 1.0;
int lines_skipped = 0;
int max_lines_visible = -1;
@@ -110,22 +109,22 @@ public:
void set_uppercase(bool p_uppercase);
bool is_uppercase() const;
- TextServer::VisibleCharactersBehavior get_visible_characters_behavior() const;
void set_visible_characters_behavior(TextServer::VisibleCharactersBehavior p_behavior);
+ TextServer::VisibleCharactersBehavior get_visible_characters_behavior() const;
void set_visible_characters(int p_amount);
int get_visible_characters() const;
int get_total_character_count() const;
+ void set_visible_ratio(float p_ratio);
+ float get_visible_ratio() const;
+
void set_clip_text(bool p_clip);
bool is_clipping_text() const;
void set_text_overrun_behavior(TextServer::OverrunBehavior p_behavior);
TextServer::OverrunBehavior get_text_overrun_behavior() const;
- void set_percent_visible(float p_percent);
- float get_percent_visible() const;
-
void set_lines_skipped(int p_lines);
int get_lines_skipped() const;