[Tux4kids-commits] r1690 - tuxtype/trunk/src
David Bruce
dbruce-guest at alioth.debian.org
Sun Dec 20 03:29:49 UTC 2009
Author: dbruce-guest
Date: 2009-12-20 03:29:49 +0000 (Sun, 20 Dec 2009)
New Revision: 1690
Modified:
tuxtype/trunk/src/titlescreen.c
Log:
Fix of keyboard navigation of main menu
Modified: tuxtype/trunk/src/titlescreen.c
===================================================================
--- tuxtype/trunk/src/titlescreen.c 2009-12-20 03:29:42 UTC (rev 1689)
+++ tuxtype/trunk/src/titlescreen.c 2009-12-20 03:29:49 UTC (rev 1690)
@@ -256,7 +256,7 @@
while (!done)
{
- start=SDL_GetTicks();
+ start = SDL_GetTicks();
/* ---process input queue --- */
@@ -269,11 +269,15 @@
{
switch (event.type)
{
-
+ /* Update "selection" if mouse moves within a menu entry: */
case SDL_MOUSEMOTION:
{
cursor.x = event.motion.x;
cursor.y = event.motion.y;
+
+ for (j = 1; j <= TITLE_MENU_ITEMS; j++)
+ if (inRect(menu_button[j], cursor.x, cursor.y))
+ key_menu = j;
break;
}
@@ -752,8 +756,8 @@
/* --- check if mouse is in a menu option --- */
- key_menu = 0;
-
+// key_menu = 0;
+/*
for (j = 1; j <= TITLE_MENU_ITEMS; j++)
{
if ((cursor.x >= menu_button[j].x && cursor.x <= (menu_button[j].x + menu_button[j].w)) &&
@@ -762,7 +766,7 @@
key_menu = j; // update menu to point
break; // Don't need to check rest of menu
}
- }
+ }*/
/* --- return old selection to unselected state --- */
More information about the Tux4kids-commits
mailing list