[Tux4kids-commits] r1344 - in tuxtype/branches/gsoc-sarah: doc src

Sarah Frisk fou_fou-guest at alioth.debian.org
Mon Aug 3 20:25:50 UTC 2009


Author: fou_fou-guest
Date: 2009-08-03 20:25:50 +0000 (Mon, 03 Aug 2009)
New Revision: 1344

Modified:
   tuxtype/branches/gsoc-sarah/doc/ChangeLog
   tuxtype/branches/gsoc-sarah/src/editor.c
Log:
change button icons

Modified: tuxtype/branches/gsoc-sarah/doc/ChangeLog
===================================================================
--- tuxtype/branches/gsoc-sarah/doc/ChangeLog	2009-08-03 20:07:29 UTC (rev 1343)
+++ tuxtype/branches/gsoc-sarah/doc/ChangeLog	2009-08-03 20:25:50 UTC (rev 1344)
@@ -1,3 +1,9 @@
+3 Aug 2009 (svn.debian.org/tux4kids - revision 1344)
+[Sarah Frisk <ssfrisk at gmail.com> ]
+	- Set all buttons in editor to the wordlist_button, which is
+	a blank button that can be written over, and fits in the smaller
+	version of the program.
+
 3 Aug 2009 (svn.debian.org/tux4kids - revision 1343)
 [Sarah Frisk <ssfrisk at gmail.com> ]
 	- Changed button sizes for the wordlist_button

Modified: tuxtype/branches/gsoc-sarah/src/editor.c
===================================================================
--- tuxtype/branches/gsoc-sarah/src/editor.c	2009-08-03 20:07:29 UTC (rev 1343)
+++ tuxtype/branches/gsoc-sarah/src/editor.c	2009-08-03 20:25:50 UTC (rev 1344)
@@ -26,6 +26,8 @@
 void ChooseListToEdit(void)
 {
   SDL_Surface* new_button = NULL;
+   SDL_Surface* remove_button = NULL;
+  SDL_Surface* done_button = NULL;
   //this is text:
   SDL_Surface *s1 = NULL, *s2 = NULL, *s3 = NULL, *s4 = NULL;
   SDL_Rect locText;
@@ -124,7 +126,10 @@
   s4 = BlackOutline(gettext_noop("To exit Word List Editor, press ESC"), 11, &white);	
 
   /* Load image of new word list button: */
-  new_button = LoadImage("NewWordList.png", IMG_ALPHA);
+  new_button = LoadImage("wordlist_button.png", IMG_ALPHA);
+  remove_button = LoadImage("wordlist_button.png", IMG_ALPHA);
+  done_button = LoadImage("wordlist_button.png", IMG_ALPHA);
+
   LOG( "ChooseFile() - drawing screen\n");
 
 
@@ -139,10 +144,15 @@
   locText.x = screen->w/2 - (s4->w/2); locText.y = 90;
   SDL_BlitSurface( s4, NULL, screen, &locText);
 
-  button_rect.x = screen->w/3 * 2; button_rect.y = 200;
-  SDL_BlitSurface(new_button, NULL, screen, &button_rect);
+   button_rect.x = screen->w - new_button->w - 20; 
+  button_rect.y = screen->h/3;
+   SDL_BlitSurface(new_button, NULL, screen, &button_rect);
+  button_rect.y += new_button->h + 10;
+  SDL_BlitSurface(remove_button, NULL, screen, &button_rect);
+  button_rect.y += new_button->h + 10;
+  SDL_BlitSurface(done_button, NULL, screen, &button_rect);
 
- 
+  SDL_UpdateRect(screen, 0, 0, 0, 0); 
 
 
   /* set initial rect sizes */
@@ -246,9 +256,6 @@
 
 
 
-
-
-
     /* Redraw if a different menu entry is selected: */
     if (old_loc != loc || redraw == 1)
     {
@@ -306,6 +313,12 @@
     SDL_FreeSurface(s3);
   if(s4)
     SDL_FreeSurface(s4);
+  if(new_button)
+    SDL_FreeSurface(new_button);
+  if(remove_button)
+    SDL_FreeSurface(remove_button);
+  if(done_button)
+    SDL_FreeSurface(done_button);
 }
 
 
@@ -676,7 +689,7 @@
 	CANCEL_button = LoadImage("wordlist_button.png", IMG_ALPHA);
 	
 	
-
+	SDL_BlitSurface(CurrentBkgd(), NULL, screen, NULL);
 	
 	OK_rect.x = screen->w/4; OK_rect.y = screen->h/3 * 2;
   	SDL_BlitSurface(OK_button, NULL, screen, &OK_rect);




More information about the Tux4kids-commits mailing list