From fdc5e8760fb7ac0af8e7ebb98a2076db15e31082 Mon Sep 17 00:00:00 2001 From: aura Date: Mon, 16 Mar 2026 10:15:01 +0100 Subject: giga refactor, fix ALL the leaks --- src/gui/base.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/base.h b/src/gui/base.h index e62c66a..293de74 100644 --- a/src/gui/base.h +++ b/src/gui/base.h @@ -1,6 +1,5 @@ #pragma once #include "../render/gl_2d.h" -#include // ======================================= [ colorscheme ] ======================================== @@ -46,7 +45,7 @@ extern U8 gui_is_fg_window( struct GUI_BASE* node ); // 1 if pa // ======================================= [ components ] ========================================= -using GUI_CALLBACK = std::function; +using GUI_CALLBACK = FN; struct GUI_LIST_ENTRY { I32 val; char title[256]; @@ -129,6 +128,8 @@ extern void gui_base_input_fn( void* ); extern void gui_view_draw_fn( void* ); struct GUI_BASE { + virtual ~GUI_BASE() = default; + I32 x{}, y{}; I32 w{}, h{}; U8 enabled{1}; -- cgit v1.2.3