summaryrefslogtreecommitdiff
path: root/src/ui_elements/UI.c
diff options
context:
space:
mode:
authorphysick <mynameisgennadiy@vk.com>2026-07-15 17:46:13 +0500
committerphysick <mynameisgennadiy@vk.com>2026-07-15 17:46:13 +0500
commit8b79b8149d1e23d90b5871f980aec65d8aa7ae23 (patch)
tree88a8788b75270dba53a15cbc2b6e0916f05301c6 /src/ui_elements/UI.c
parentf314b56da42e1ead200e2373e9b214f77290d03b (diff)
Puzzle infrastructure pt 1.
Diffstat (limited to 'src/ui_elements/UI.c')
-rw-r--r--src/ui_elements/UI.c3
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];