From 336aadc7a01a2bdd9de2555638de92ac7c393b98 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Tue, 13 Aug 2024 01:25:13 +0200 Subject: [PATCH] whoops forgot about this one --- src/ptk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ptk.c b/src/ptk.c index f34359d..125ad86 100644 --- a/src/ptk.c +++ b/src/ptk.c @@ -188,10 +188,11 @@ PtkHandle ptk_circle(PtkPos center, float radius, PtkColor color) { PtkHandle ptk_clickable(PtkHandle hitbox, MouseButtonCallback on_press) { PtkClickable *ret = malloc(sizeof(PtkClickable)); - ret->type = PTK_COMPONENT_TYPE_CLICKABLE; - ret->children.size = 0; - ret->hitbox = hitbox; - ret->on_press = on_press; + *ret = (PtkClickable){ + .type = PTK_COMPONENT_TYPE_CLICKABLE, + .hitbox = hitbox, + .on_press = on_press, + }; return (PtkHandle)ret; }