From a35731f94b0f0072783d7aba8dd24670b75716cc Mon Sep 17 00:00:00 2001 From: Physick <96335032+DegustatorPonos@users.noreply.github.com> Date: Sat, 11 Jul 2026 17:58:04 +0500 Subject: :w cleanup --- .gitignore | 1 + :w | 53 ----------------------------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 :w diff --git a/.gitignore b/.gitignore index f2ca29b..e9f0827 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ zig-out .zig-cache game.a raylib +:w diff --git a/:w b/:w deleted file mode 100644 index f1569bf..0000000 --- a/:w +++ /dev/null @@ -1,53 +0,0 @@ -#include -#include - -#ifndef UI_ELEMENTS_H -#define UI_ELEMENTS_H - -static const float SCROLL_SENC = 10; -static const float TAB_WIDTH = 4; - -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 = 256; - -typedef struct { - void *PrevNode; - void *NextNode; - char *text; - size_t len; - size_t cap; -} TextNode; - -typedef struct { - TextNode *StartNode; - /// For the quick access - TextNode *CurrentNode; - size_t NodeLenth; - - Vector2 CursorPosition; -} TextArea; - -typedef struct { - Font *font; - int scroll_h; - int scroll_v; -} TextAreaDisplayParams; - -TextArea *CreateTextArea(); -void FreeTextArea(TextArea *ta); -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); - -void HandleKeyboard(TextArea *ta); -void MoveCursorRight(TextArea *ta); -void MoveCursorLeft(TextArea *ta); -void MoveCursorDown(TextArea *ta); - -#endif // UI_ELEMENTS_H -- cgit v1.3