diff options
Diffstat (limited to 'src/ui_elements/UI.c')
| -rw-r--r-- | src/ui_elements/UI.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui_elements/UI.c b/src/ui_elements/UI.c index c653731..ffb66ba 100644 --- a/src/ui_elements/UI.c +++ b/src/ui_elements/UI.c @@ -1,7 +1,7 @@ #include "UI.h" #include <raylib.h> -const int MAX_LINES = 256; +const int MAX_LINES = 8192; const int SPACING_H = 1; void DrawRecBordered(Rectangle rec, Color bg, Color border_color, int border_width) { @@ -66,6 +66,7 @@ void DrawTextInRec(Rectangle rec, char *text, Font *font, int height, Color colo BeginScissorMode(rec.x, rec.y, rec.width, rec.height); for (int i = 1; i < lines; i++) { + if (i == MAX_LINES) break; Vector2 pos = { .x = rec.x, .y = vertical_acc }; char *line_start = text + spans[i-1]; int line_length = spans[i] - spans[i-1]; |
