Mercurial
comparison infinite_canvas/dev_ui.h @ 281:c57149ad216e default tip
Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Tue, 18 Aug 2026 22:18:15 -0700 |
| parents | 49e9e591c9bb |
| children |
comparison
equal
deleted
inserted
replaced
| 280:49e9e591c9bb | 281:c57149ad216e |
|---|---|
| 1 #ifndef INFINITE_CANVAS_DEV_UI_H | 1 #ifndef INFINITE_CANVAS_DEV_UI_H |
| 2 #define INFINITE_CANVAS_DEV_UI_H | 2 #define INFINITE_CANVAS_DEV_UI_H |
| 3 | 3 |
| 4 #include "infinite_canvas/canvas.h" | 4 #include "infinite_canvas/canvas.h" |
| 5 #include "infinite_canvas/scene_store.h" | |
| 5 | 6 |
| 6 typedef struct { | 7 typedef struct { |
| 7 int32 selected_type; | 8 int32 selected_type; |
| 8 boolean collapsed; | 9 boolean collapsed; |
| 9 boolean dropdown_open; | 10 boolean dropdown_open; |
| 10 boolean context_open; | 11 boolean context_open; |
| 11 float context_scroll; | 12 float context_scroll; |
| 12 float context_content_height; | 13 float context_content_height; |
| 13 char context_buffer[CANVAS_CONTEXT_MAX_LENGTH]; | 14 char context_buffer[CANVAS_CONTEXT_MAX_LENGTH]; |
| 15 char snapshot_name[CANVAS_SCENE_STORE_NAME_CAPACITY]; | |
| 16 char snapshot_status[96]; | |
| 17 boolean snapshot_name_editing; | |
| 14 } Canvas_Dev_UI; | 18 } Canvas_Dev_UI; |
| 19 | |
| 20 typedef enum { | |
| 21 CANVAS_DEV_UI_ACTION_NONE = 0, | |
| 22 CANVAS_DEV_UI_ACTION_SAVE_SNAPSHOT, | |
| 23 CANVAS_DEV_UI_ACTION_LOAD_SNAPSHOT, | |
| 24 } Canvas_Dev_UI_Action; | |
| 15 | 25 |
| 16 void Canvas_Dev_UI_Init( | 26 void Canvas_Dev_UI_Init( |
| 17 Canvas_Dev_UI *p_ui, | 27 Canvas_Dev_UI *p_ui, |
| 18 Font font, | 28 Font font, |
| 19 const Canvas_Theme *p_theme); | 29 const Canvas_Theme *p_theme); |
| 20 boolean Canvas_Dev_UI_Contains_Pointer(const Canvas_Dev_UI *p_ui); | 30 boolean Canvas_Dev_UI_Contains_Pointer(const Canvas_Dev_UI *p_ui); |
| 21 void Canvas_Dev_UI_Draw( | 31 boolean Canvas_Dev_UI_Is_Editing(const Canvas_Dev_UI *p_ui); |
| 32 Canvas_Dev_UI_Action Canvas_Dev_UI_Draw( | |
| 22 Canvas_Dev_UI *p_ui, | 33 Canvas_Dev_UI *p_ui, |
| 23 Canvas_Camera *p_camera, | 34 Canvas_Camera *p_camera, |
| 24 Canvas_Scene *p_scene, | 35 Canvas_Scene *p_scene, |
| 25 Font font, | 36 Font font, |
| 26 Canvas_Theme *p_theme); | 37 Canvas_Theme *p_theme); |
| 38 void Canvas_Dev_UI_Set_Snapshot_Status( | |
| 39 Canvas_Dev_UI *p_ui, | |
| 40 const char *p_status); | |
| 27 | 41 |
| 28 #endif | 42 #endif |