From 86d248ed2b033fe36ce53b0387b2cbdcb69c0b72 Mon Sep 17 00:00:00 2001 From: aura Date: Tue, 28 Jul 2026 19:11:34 +0200 Subject: finish undo/redo --- src/gui/button.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui/button.cpp') diff --git a/src/gui/button.cpp b/src/gui/button.cpp index e66130b..7cf0524 100644 --- a/src/gui/button.cpp +++ b/src/gui/button.cpp @@ -48,8 +48,10 @@ void gui_button_input_fn( void* ptr ) { // button could be destroyed by callback U8 was_held = btn->held; btn->held = 0; - if( inbounds && was_held ) - btn->cb( btn ); + if( inbounds && was_held ) { + if( btn->pre_cb ) btn->pre_cb( btn ); + if( btn->cb ) btn->cb( btn ); + } return; } -- cgit v1.2.3