summaryrefslogtreecommitdiff
path: root/src/ui_elements
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui_elements')
-rw-r--r--src/ui_elements/TextEditor.c1
-rw-r--r--src/ui_elements/UI.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/ui_elements/TextEditor.c b/src/ui_elements/TextEditor.c
index 1097f1c..06cfc41 100644
--- a/src/ui_elements/TextEditor.c
+++ b/src/ui_elements/TextEditor.c
@@ -1,4 +1,5 @@
// TODO: fix j being outside of the box SOME FUCKING HOW
+// upd. seems to be fixed with a swirch to monofont
#include "UI.h"
#include "../resources/resources.h"
diff --git a/src/ui_elements/UI.c b/src/ui_elements/UI.c
index a9ab498..c653731 100644
--- a/src/ui_elements/UI.c
+++ b/src/ui_elements/UI.c
@@ -40,6 +40,7 @@ bool IsMouseInRec(Rectangle rec) {
}
void DrawTextInRec(Rectangle rec, char *text, Font *font, int height, Color color, float padding, int *scroll) {
+ if (text == NULL) return;
int spans[MAX_LINES];
rec.x += padding;
rec.y += padding;