summaryrefslogtreecommitdiff
path: root/src/gui/button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/button.cpp')
-rw-r--r--src/gui/button.cpp6
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;
}