mirror of
https://github.com/godotengine/godot.git
synced 2024-11-26 06:03:38 +00:00
Merge pull request #65213 from Mickeon/fix-label-visible-ratio
This commit is contained in:
commit
7e3afc3d09
@ -805,10 +805,10 @@ int Label::get_visible_characters() const {
|
||||
|
||||
void Label::set_visible_ratio(float p_ratio) {
|
||||
if (visible_ratio != p_ratio) {
|
||||
if (visible_ratio >= 1.0) {
|
||||
if (p_ratio >= 1.0) {
|
||||
visible_chars = -1;
|
||||
visible_ratio = 1.0;
|
||||
} else if (visible_ratio < 0.0) {
|
||||
} else if (p_ratio < 0.0) {
|
||||
visible_chars = 0;
|
||||
visible_ratio = 0.0;
|
||||
} else {
|
||||
|
@ -4945,10 +4945,10 @@ void RichTextLabel::set_visible_ratio(float p_ratio) {
|
||||
if (visible_ratio != p_ratio) {
|
||||
_stop_thread();
|
||||
|
||||
if (visible_ratio >= 1.0) {
|
||||
if (p_ratio >= 1.0) {
|
||||
visible_characters = -1;
|
||||
visible_ratio = 1.0;
|
||||
} else if (visible_ratio < 0.0) {
|
||||
} else if (p_ratio < 0.0) {
|
||||
visible_characters = 0;
|
||||
visible_ratio = 0.0;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user