From 15086bff2e32bf67f9a093b35b53b81a6b4851e0 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Sun, 26 Apr 2026 17:24:42 +1200 Subject: QoL stuff and get a bit more of stuff implemented --- include/saffron_widget.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/saffron_widget.h') 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 -- cgit v1.2.3