summaryrefslogtreecommitdiffstats
path: root/src/main-menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main-menu.c')
-rw-r--r--src/main-menu.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main-menu.c b/src/main-menu.c
index 2a0ace8..75d2ce0 100644
--- a/src/main-menu.c
+++ b/src/main-menu.c
@@ -20,6 +20,7 @@
#include <SDL.h>
#include <SDL_ttf.h>
#include <stdlib.h>
+#include "collision.h"
#include "game.h"
#include "main-menu.h"
#include "main.h"
@@ -330,6 +331,20 @@ db_main_menu(void)
break;
}
break;
+ case SDL_MOUSEMOTION:
+ if (event.motion.state != 0) {
+ break;
+ }
+ for (i = 0; i < n + 2; ++i) {
+ if (db_pt_in_rect(event.motion.x,
+ event.motion.y,
+ &buttons[i]->rect))
+ {
+ active = buttons[i];
+ break;
+ }
+ }
+ break;
default:
break;
}