[Tux4kids-commits] r1408 - in tuxtype/branches/gsoc-sarah: doc src
Sarah Frisk
fou_fou-guest at alioth.debian.org
Tue Aug 11 00:01:35 UTC 2009
Author: fou_fou-guest
Date: 2009-08-11 00:01:33 +0000 (Tue, 11 Aug 2009)
New Revision: 1408
Modified:
tuxtype/branches/gsoc-sarah/doc/ChangeLog
tuxtype/branches/gsoc-sarah/src/editor.c
Log:
fixed centering issues, pressing 'cancel' now lets the screen draw
Modified: tuxtype/branches/gsoc-sarah/doc/ChangeLog
===================================================================
--- tuxtype/branches/gsoc-sarah/doc/ChangeLog 2009-08-10 22:46:47 UTC (rev 1407)
+++ tuxtype/branches/gsoc-sarah/doc/ChangeLog 2009-08-11 00:01:33 UTC (rev 1408)
@@ -1,3 +1,8 @@
+10 Aug 2009 (svn.debian.org/tux4kids -revision 1408)
+[Sarah Frisk <ssfrisk at gmail.com> }
+ -Test for the new wordlist function is now centered
+ -pressing cancel now redraws the screen
+
10 Aug 2009 (svn.debian.org/tux4kids -revision 1407)
[Sarah Frisk <ssfrisk at gmail.com> }
-Left and right arrows now show up
Modified: tuxtype/branches/gsoc-sarah/src/editor.c
===================================================================
--- tuxtype/branches/gsoc-sarah/src/editor.c 2009-08-10 22:46:47 UTC (rev 1407)
+++ tuxtype/branches/gsoc-sarah/src/editor.c 2009-08-11 00:01:33 UTC (rev 1408)
@@ -251,7 +251,8 @@
if (inRect(button_rect[New], event.button.x, event.button.y))
{
change = CreateNewWordList();
-
+ if (!change)
+ redraw = 1;
}
if (inRect(button_rect[Remove], event.button.x, event.button.y))
@@ -484,6 +485,10 @@
SDL_FreeSurface(REMOVE);
if(DONE)
SDL_FreeSurface(DONE);
+ if(left)
+ SDL_FreeSurface(left);
+ if(right)
+ SDL_FreeSurface(right);
}
@@ -733,7 +738,8 @@
{
len = ConvertFromUTF8(temp, words_in_list[loc], FNLEN);
}
-
+ if (loc != 0)
+ {
// Add the character to the end of the existing string
temp[len] = toupper(event.key.keysym.unicode);
temp[len + 1] = 0;
@@ -742,7 +748,7 @@
// Copy back to the on-screen list
white_words[loc] = BlackOutline(words_in_list[loc], DEFAULT_MENU_FONT_SIZE, &white );
yellow_words[loc] = BlackOutline(words_in_list[loc], DEFAULT_MENU_FONT_SIZE, &yellow);
-
+ }
i = 0;
break;
}
@@ -1014,7 +1020,10 @@
Text.y = screen->h / 3;
Text.w = Text.h = 0;
- Text.x = screen->w /2;
+ if (len > 0)
+ Text.x = screen->w /2 - NewWordlist->w/2;
+ else
+ Text.x = screen->w /2;
SDL_BlitSurface(NewWordlist, NULL, screen, &Text);
SDL_UpdateRect(screen, 0, 0, 0, 0);
}
@@ -1023,9 +1032,6 @@
} // End of 'while(!stop)' loop
- fprintf(stderr, "Check Two\n");
-
-
/* Creating file, if possible */
if (save == 1)
{
@@ -1055,7 +1061,6 @@
if(Direction)
SDL_FreeSurface(Direction);
- fprintf(stderr, "Check Three\n");
// OK = CANCEL = OK_button = CANCEL_button = NULL;
return save;
}
More information about the Tux4kids-commits
mailing list