[Tux4kids-commits] r1055 - tuxtype/branches/gsoc-sarah/src
Sarah Frisk
fou_fou-guest at alioth.debian.org
Tue Jun 16 07:54:43 UTC 2009
Author: fou_fou-guest
Date: 2009-06-16 07:54:42 +0000 (Tue, 16 Jun 2009)
New Revision: 1055
Modified:
tuxtype/branches/gsoc-sarah/src/titlescreen.c
Log:
Made it so people can create words. Still a little buggy, but for the most part works.
Modified: tuxtype/branches/gsoc-sarah/src/titlescreen.c
===================================================================
--- tuxtype/branches/gsoc-sarah/src/titlescreen.c 2009-06-16 03:59:12 UTC (rev 1054)
+++ tuxtype/branches/gsoc-sarah/src/titlescreen.c 2009-06-16 07:54:42 UTC (rev 1055)
@@ -1704,7 +1704,7 @@
char str[FNLEN];
char words_in_list[MAX_WORD_LISTS][FNLEN];
- wchar_t temp[FNLEN];
+ wchar_t temp[FNLEN], temp2[FNLEN];
/* save previous settings in case we back out: */
// old_use_english = settings.use_english;
@@ -1880,13 +1880,21 @@
if(i)
{
- if (event.key.keysym.sym == SDLK_RETURN)
- break;
- if (listening_for_new_word == 1) {
- fprintf(stderr, "REPLACE THIS CODE WITH CREATE NEW WORD!\n");
- listening_for_new_word = 0;
- break;
- }
+ if (event.key.keysym.sym == SDLK_RETURN)
+ {
+ if (number_of_words < MAX_WORD_LISTS)
+ {
+ loc = number_of_words;
+ titles[loc] = BlackOutline(words_in_list[loc], DEFAULT_MENU_FONT_SIZE, &white );
+ select[loc] = BlackOutline(words_in_list[loc], DEFAULT_MENU_FONT_SIZE, &yellow);
+ number_of_words ++;
+ }
+ else
+ {
+
+ }
+ }
+
len = ConvertFromUTF8(temp, words_in_list[loc], FNLEN);
temp[len] = toupper(event.key.keysym.unicode);
temp[len + 1] = 0;
More information about the Tux4kids-commits
mailing list