[Tux4kids-commits] r1273 - tuxmath/trunk/src

Bolesław Kulbabiński bolekk-guest at alioth.debian.org
Sat Jul 25 13:35:17 UTC 2009


Author: bolekk-guest
Date: 2009-07-25 13:35:15 +0000 (Sat, 25 Jul 2009)
New Revision: 1273

Modified:
   tuxmath/trunk/src/menu.c
   tuxmath/trunk/src/setup.c
   tuxmath/trunk/src/titlescreen.c
Log:
fixed some small menu bugs

Modified: tuxmath/trunk/src/menu.c
===================================================================
--- tuxmath/trunk/src/menu.c	2009-07-25 13:19:13 UTC (rev 1272)
+++ tuxmath/trunk/src/menu.c	2009-07-25 13:35:15 UTC (rev 1273)
@@ -918,7 +918,10 @@
             tmp_rect = menu->submenu[loc + menu->first_entry]->button_rect;
             SDL_BlitSurface(menu_item_selected[loc], NULL, screen, &tmp_rect);
             if(menu->submenu[menu->first_entry + loc]->icon)
+            {
               SDL_BlitSurface(menu->submenu[menu->first_entry + loc]->icon->default_img, NULL, screen, &menu->submenu[menu->first_entry + loc]->icon_rect);
+              menu->submenu[menu->first_entry + loc]->icon->cur = 0;
+            }
             SDL_UpdateRect(screen, tmp_rect.x, tmp_rect.y, tmp_rect.w, tmp_rect.h);
           }
           old_loc = loc;
@@ -975,6 +978,7 @@
               {
                 menu->first_entry = 0;
                 menu = tmp_node;
+                menu->first_entry = 0;
               }
               stop = true;
             }

Modified: tuxmath/trunk/src/setup.c
===================================================================
--- tuxmath/trunk/src/setup.c	2009-07-25 13:19:13 UTC (rev 1272)
+++ tuxmath/trunk/src/setup.c	2009-07-25 13:35:15 UTC (rev 1273)
@@ -122,8 +122,6 @@
   initialize_SDL();
   /* Read image and sound files: */
   load_data_files();
-  /* load menus */
-  LoadMenus();
   /* Generate flipped versions of walking images */
   generate_flipped_images();
   /* Generate blended images (e.g., igloos) */

Modified: tuxmath/trunk/src/titlescreen.c
===================================================================
--- tuxmath/trunk/src/titlescreen.c	2009-07-25 13:19:13 UTC (rev 1272)
+++ tuxmath/trunk/src/titlescreen.c	2009-07-25 13:35:15 UTC (rev 1273)
@@ -169,6 +169,8 @@
     /* Play "harp" greeting sound lifted from Tux Paint */
     playsound(SND_HARP);
     SDL_FreeSurface(logo);
+    /* load menus */
+    LoadMenus();
   }
 
   /* load backgrounds */




More information about the Tux4kids-commits mailing list