diff options
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r-- | scene/gui/label.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index b7918994d8..36940655d4 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -397,6 +397,7 @@ void Label::regenerate_word_cache() { } + if (current=='\n') { insert_newline=true; } else { @@ -446,7 +447,7 @@ void Label::regenerate_word_cache() { } - total_char_cache -= line_count + 1; // do not count new lines (including the first one) + //total_char_cache -= line_count + 1; // do not count new lines (including the first one) if (!autowrap) { @@ -535,7 +536,7 @@ void Label::set_percent_visible(float p_percent) { if (p_percent<0) set_visible_characters(-1); else - set_visible_characters(get_total_character_count()*p_percent); + set_visible_characters(get_total_character_count()*p_percent); percent_visible=p_percent; } |