You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
space is only skipped when autowrap.
This commit is contained in:
@@ -212,7 +212,7 @@ void Label::_notification(int p_what) {
|
|||||||
ERR_PRINT("BUG");
|
ERR_PRINT("BUG");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (from!=wc && from->space_count) {
|
if (from->space_count) {
|
||||||
/* spacing */
|
/* spacing */
|
||||||
x_ofs+=space_w*from->space_count;
|
x_ofs+=space_w*from->space_count;
|
||||||
if (can_fill && align==ALIGN_FILL && spaces) {
|
if (can_fill && align==ALIGN_FILL && spaces) {
|
||||||
@@ -411,7 +411,7 @@ void Label::regenerate_word_cache() {
|
|||||||
|
|
||||||
if (i<text.length() && text[i] == ' ') {
|
if (i<text.length() && text[i] == ' ') {
|
||||||
total_char_cache--; // do not count spaces
|
total_char_cache--; // do not count spaces
|
||||||
if (line_width > 0) {
|
if (line_width > 0 || last==NULL || last->char_pos!=WordCache::CHAR_WRAPLINE) {
|
||||||
space_count++;
|
space_count++;
|
||||||
line_width+=space_width;
|
line_width+=space_width;
|
||||||
}else {
|
}else {
|
||||||
@@ -467,7 +467,6 @@ void Label::regenerate_word_cache() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print_line(itos(line_width));
|
|
||||||
if ((autowrap && line_width>=width && last_width<width) || insert_newline) {
|
if ((autowrap && line_width>=width && last_width<width) || insert_newline) {
|
||||||
|
|
||||||
WordCache *wc = memnew( WordCache );
|
WordCache *wc = memnew( WordCache );
|
||||||
|
|||||||
Reference in New Issue
Block a user