diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 62c7c57..d4d1de1 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -363805,7 +363805,7 @@ vec2 font_clip(const char *text, vec4 rect) { } vec2 dims = font_draw_ex(text, gotoxy, rect, NULL, font_draw_cmd); gotoxy.y += strchr(text, '\n') ? dims.y : 0; - gotoxy.x = strchr(text, '\n') ? gotoxy.x + rect.x : gotoxy.x + dims.x; + gotoxy.x += !strchr(text, '\n') ? dims.x : 0; return dims; } } @@ -363889,7 +363889,7 @@ vec2 font_highlight(const char *text, const void *colors) { vec4 screen_dim = {0, 0, window_width(), window_height()}; vec2 dims = font_draw_ex(text, gotoxy, screen_dim, (const char *)colors, font_draw_cmd); gotoxy.y += strchr(text, '\n') ? dims.y : 0; - gotoxy.x += !strchr(text, '\n') ? gotoxy.x + dims.x : 0; + gotoxy.x += !strchr(text, '\n') ? dims.x : 0; return dims; } diff --git a/engine/split/v4k_font.c b/engine/split/v4k_font.c index 39a72f5..f6d97e7 100644 --- a/engine/split/v4k_font.c +++ b/engine/split/v4k_font.c @@ -2248,7 +2248,7 @@ vec2 font_clip(const char *text, vec4 rect) { } vec2 dims = font_draw_ex(text, gotoxy, rect, NULL, font_draw_cmd); gotoxy.y += strchr(text, '\n') ? dims.y : 0; - gotoxy.x = strchr(text, '\n') ? gotoxy.x + rect.x : gotoxy.x + dims.x; + gotoxy.x += !strchr(text, '\n') ? dims.x : 0; return dims; } } @@ -2332,7 +2332,7 @@ vec2 font_highlight(const char *text, const void *colors) { vec4 screen_dim = {0, 0, window_width(), window_height()}; vec2 dims = font_draw_ex(text, gotoxy, screen_dim, (const char *)colors, font_draw_cmd); gotoxy.y += strchr(text, '\n') ? dims.y : 0; - gotoxy.x += !strchr(text, '\n') ? gotoxy.x + dims.x : 0; + gotoxy.x += !strchr(text, '\n') ? dims.x : 0; return dims; } diff --git a/engine/v4k.c b/engine/v4k.c index cfd08f3..5df5a75 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -10946,7 +10946,7 @@ vec2 font_clip(const char *text, vec4 rect) { } vec2 dims = font_draw_ex(text, gotoxy, rect, NULL, font_draw_cmd); gotoxy.y += strchr(text, '\n') ? dims.y : 0; - gotoxy.x = strchr(text, '\n') ? gotoxy.x + rect.x : gotoxy.x + dims.x; + gotoxy.x += !strchr(text, '\n') ? dims.x : 0; return dims; } } @@ -11030,7 +11030,7 @@ vec2 font_highlight(const char *text, const void *colors) { vec4 screen_dim = {0, 0, window_width(), window_height()}; vec2 dims = font_draw_ex(text, gotoxy, screen_dim, (const char *)colors, font_draw_cmd); gotoxy.y += strchr(text, '\n') ? dims.y : 0; - gotoxy.x += !strchr(text, '\n') ? gotoxy.x + dims.x : 0; + gotoxy.x += !strchr(text, '\n') ? dims.x : 0; return dims; }