diff options
| author | aura <nw@moneybot.cc> | 2026-07-28 19:11:34 +0200 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-07-28 19:11:34 +0200 |
| commit | 86d248ed2b033fe36ce53b0387b2cbdcb69c0b72 (patch) | |
| tree | a70f32a0f44b927a6d137998efa405e330689c0f /src/gui/button.cpp | |
| parent | 468813b133a6a3ff0b85d3b34f1009cfeae815e4 (diff) | |
finish undo/redo
Diffstat (limited to 'src/gui/button.cpp')
| -rw-r--r-- | src/gui/button.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |
