diff options
| author | nathan <nathansmith@disroot.org> | 2025-11-24 08:04:49 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2025-11-24 08:04:49 +0000 |
| commit | a0d31fa794cb4d805b83f52495dfb4cb8a0ae861 (patch) | |
| tree | acb099e427e974d2ca97e30147329f058f2fb868 /src/ui.h | |
| parent | 52a58016c7217942ab06988cc9adacc6e76689ca (diff) | |
| download | FindThings-a0d31fa794cb4d805b83f52495dfb4cb8a0ae861.tar.gz FindThings-a0d31fa794cb4d805b83f52495dfb4cb8a0ae861.tar.bz2 FindThings-a0d31fa794cb4d805b83f52495dfb4cb8a0ae861.zip | |
Ditching windowed ui
Diffstat (limited to 'src/ui.h')
| -rw-r--r-- | src/ui.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/ui.h b/src/ui.h deleted file mode 100644 index 30853fb..0000000 --- a/src/ui.h +++ /dev/null @@ -1,58 +0,0 @@ -#include "utils.h" - -#ifndef UI_H -#define UI_H - -#ifndef RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT -#define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT 24 -#endif - -#ifndef RAYGUI_WINDOW_CLOSEBUTTON_SIZE -#define RAYGUI_WINDOW_CLOSEBUTTON_SIZE 18 -#endif - -#define UI_WINDOW_TITLE_MAX 32 -#define UI_WINDOW_MAX 4 - -typedef struct FloatingWindow FloatingWindow; -typedef enum FocusCommand FocusCommand; -typedef FocusCommand (*DrawWindowContentCallback)(FloatingWindow* window, - Game* game); - -enum FocusCommand { - NO_FOCUS_ACTION, - REQUEST_FOCUS, - DEMAND_FOCUS -}; - -struct FloatingWindow { - char title[UI_WINDOW_TITLE_MAX]; - Rectangle rect; - bool minimized; - bool moving; - bool resizing; - DrawWindowContentCallback callback; - Vector2 contentSize; - Vector2 scroll; - bool hasFocus; - void* data; -}; - -typedef struct { - FloatingWindow windows[UI_WINDOW_MAX]; - int windowCount; - bool enabled; -} WindowManager; - -FloatingWindow createFloatingWindow(const char* title, Rectangle rect); -FocusCommand updateFloatingWindow(FloatingWindow* window, WindowManager* wm, - Game* game); - -void initWindowManager(WindowManager* wm); -void updateWindowManager(WindowManager* wm, Game* game); -void addWindowToWindowManager(WindowManager* wm, FloatingWindow window); -void focusOnWindow(WindowManager* wm, int windowIndex); -void enableWindowManager(WindowManager* wm); -void disableWindowManager(WindowManager* wm); - -#endif |
