diff options
| author | aura <nw@moneybot.cc> | 2026-03-16 10:15:01 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-03-16 10:15:01 +0100 |
| commit | fdc5e8760fb7ac0af8e7ebb98a2076db15e31082 (patch) | |
| tree | c94991e1e594c7703295aa413caf40786f343c1f /src/gui | |
| parent | e2829336cfedb39d23263f75b61ed969c8193534 (diff) | |
giga refactor, fix ALL the leaks
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/base.h | 5 |
1 files changed, 3 insertions, 2 deletions
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 <functional> // ======================================= [ colorscheme ] ======================================== @@ -46,7 +45,7 @@ extern U8 gui_is_fg_window( struct GUI_BASE* node ); // 1 if pa // ======================================= [ components ] ========================================= -using GUI_CALLBACK = std::function<void( void* )>; +using GUI_CALLBACK = FN<void( void* )>; 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}; |
