From 1fe9fa841c9f485b4404716cf4fb834f6a98fcc9 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 6 Nov 2025 04:30:38 -0700 Subject: Working on window manager --- src/ui.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/ui.h') diff --git a/src/ui.h b/src/ui.h index 5868b50..fcf17a0 100644 --- a/src/ui.h +++ b/src/ui.h @@ -11,9 +11,13 @@ #define RAYGUI_WINDOW_CLOSEBUTTON_SIZE 18 #endif +#define UI_WINDOW_TITLE_MAX 32 +#define UI_WINDOW_MAX 4 + typedef void (*DrawWindowContentCallback)(Vector2 position, Vector2 scroll); typedef struct { + char title[UI_WINDOW_TITLE_MAX]; Rectangle rect; bool minimized; bool moving; @@ -23,7 +27,15 @@ typedef struct { Vector2 scroll; } FloatingWindow; -FloatingWindow createFloatingWindow(); -void updateFloatingWindow(FloatingWindow* window, const char* title); +typedef struct { + FloatingWindow windows[UI_WINDOW_MAX]; + int windowCount; +} WindowManager; + +FloatingWindow createFloatingWindow(const char* title); +void updateFloatingWindow(FloatingWindow* window); + +void initWindowManager(WindowManager* windowManager); +void updateWindowManager(WindowManager* windowManager); #endif -- cgit v1.2.3