adding multiple hooks supports for events and loop

This commit is contained in:
Kbz-8
2024-12-17 02:33:04 +01:00
parent 8f4dc6e3b5
commit ffff4722b7
15 changed files with 77 additions and 59 deletions

View File

@@ -38,8 +38,11 @@ namespace mlx
m_in.FetchInputs();
if(f_loop_hook)
f_loop_hook(p_param);
for(const auto& hook : m_hooks)
{
if(hook.fn)
hook.fn(hook.param);
}
for(auto& gs : m_graphics)
{