#pragma once

typedef struct GUIWindow_t
{
	Vec2 p0;
	Vec2 p1;
	Vec2 grabbed_pos;
	u32 id;
	b8 grabbed;
} GUIWindow;

typedef struct GUIButton_t
{
	Vec2 p0;
	Vec2 p1;
	u32	 id;
	b8 	 pressed;
	b8 	 pressed_prev;
} GUIButton;

typedef struct GameContext_t 
{
	GUIContext gui;
	PushConst  pc;
	Arena      *arena;
	GUIWindow  *windows;
	u32        window_len;
	GUIButton  *buttons;
	u32        btn_len;
} GameContext;

static void RunCycle(GameContext *ctx, GameInput *inputs, u32 i_count);
static void InitializeGame(Arena *arena, GameContext *ctx, Arena *ctx_arena);
static void DestroyGame();
static void DrawRect(GUIContext *ctx, Vec2 p0, Vec2 p1, Vec4 col);
static void HandleInputs(GameInput *inputs, u32 count);
