diff options
| author | Arslaan Pathan <[email protected]> | 2026-04-26 17:24:42 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-04-26 17:24:42 +1200 |
| commit | 15086bff2e32bf67f9a093b35b53b81a6b4851e0 (patch) | |
| tree | c26ded4d7893ea86eda4ba081fda0cd7295a09fa /include | |
| parent | 4fbf7e5b7b5325828099456c347183ba92864862 (diff) | |
| download | saffron-15086bff2e32bf67f9a093b35b53b81a6b4851e0.tar.xz saffron-15086bff2e32bf67f9a093b35b53b81a6b4851e0.zip | |
QoL stuff and get a bit more of stuff implemented
Diffstat (limited to 'include')
| -rw-r--r-- | include/saffron_widget.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/saffron_widget.h b/include/saffron_widget.h index ddf4f78..5c0005c 100644 --- a/include/saffron_widget.h +++ b/include/saffron_widget.h @@ -17,8 +17,8 @@ typedef enum { typedef struct SaffronWidget { int x, y, w, h; - void (*draw)(struct SaffronWidget *self, SDL_Renderer *renderer); - void (*on_click)(struct SaffronWidget *self); + void (*draw)(struct SaffronWidget* self, SDL_Renderer* renderer); + void (*on_click)(struct SaffronWidget* self); struct SaffronWidget* parent; struct SaffronWidget** children; int child_count; @@ -26,6 +26,7 @@ typedef struct SaffronWidget { SaffronSizeMode height_mode; bool pixel_perfect; // Do we scale dynamically (SaffronSizeMode, etc) or use raw x, y, w, h values? If this is true, the SaffronSizeModes from earlier will be ignored. this pretty much tells the engine NOT to layout your widgets, don't expect it to allocate size for it. get better SaffronWidgetType type; + void (*free)(struct SaffronWidget* self); } SaffronWidget; #endif |
