From 9aa2cdf85381afe4e139174d8ddc9f23de60a066 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 19 Mar 2021 07:00:48 -0400 Subject: main-menu: Handle mouse button events --- (limited to 'src') diff --git a/src/main-menu.c b/src/main-menu.c index 75d2ce0..93c816d 100644 --- a/src/main-menu.c +++ b/src/main-menu.c @@ -345,6 +345,16 @@ db_main_menu(void) } } break; + case SDL_MOUSEBUTTONUP: + if (event.button.button != SDL_BUTTON_LEFT) { + break; + } + if (db_pt_in_rect(event.button.x, + event.button.y, + &active->rect)) { + active->action(active->user_data); + } + break; default: break; } -- cgit v0.9.1