From 90988da0bdae2c56366abb01f402a0cd34279143 Mon Sep 17 00:00:00 2001 From: Physick <96335032+DegustatorPonos@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:56:13 +0500 Subject: QOL changes + some emacs-like movements --- src/ui_elements/UI.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui_elements/UI.h') diff --git a/src/ui_elements/UI.h b/src/ui_elements/UI.h index 1029289..779290f 100644 --- a/src/ui_elements/UI.h +++ b/src/ui_elements/UI.h @@ -4,13 +4,16 @@ #ifndef UI_ELEMENTS_H #define UI_ELEMENTS_H +static const float SCROLL_SENC = 10; + void DrawRecBordered(Rectangle rec, Color bg, Color border_color, int border_width); void DrawTextInRec(Rectangle rec, char *text, Font *font, int height, Color color, float padding, int *scroll); float MeasureChar(Font *font, int height, char symbol); +bool IsMouseInRec(Rectangle rec); // ========== TEXT EDITOR ========== -static const size_t DEFAULT_TEXT_NODE_SIZE = 5; +static const size_t DEFAULT_TEXT_NODE_SIZE = 256; typedef struct { void *PrevNode; @@ -31,7 +34,7 @@ typedef struct { TextArea *CreateTextArea(); void FreeTextArea(TextArea *ta); -void DrawTextArea(TextArea *ta, Rectangle rec, Font *font, int height, int spacing); +void DrawTextArea(TextArea *ta, Rectangle rec, Font *font, int height, int spacing, int *scroll); void InsertChar(TextArea *ta, char new_char); void DeleteChar(TextArea *ta); -- cgit v1.3