[Tux4kids-commits] r1607 - tuxmath/trunk/src
David Bruce
dbruce-guest at alioth.debian.org
Mon Oct 26 16:55:42 UTC 2009
Author: dbruce-guest
Date: 2009-10-26 16:55:42 +0000 (Mon, 26 Oct 2009)
New Revision: 1607
Modified:
tuxmath/trunk/src/highscore.h
tuxmath/trunk/src/menu.c
tuxmath/trunk/src/titlescreen.c
tuxmath/trunk/src/titlescreen.h
Log:
Added font_size parameter to ShowMessage()
Modified: tuxmath/trunk/src/highscore.h
===================================================================
--- tuxmath/trunk/src/highscore.h 2009-10-26 16:55:35 UTC (rev 1606)
+++ tuxmath/trunk/src/highscore.h 2009-10-26 16:55:42 UTC (rev 1607)
@@ -20,6 +20,8 @@
void DisplayHighScores(int level);
void HighScoreNameEntry(char* pl_name);
void NameEntry(char* pl_name, const char* heading, const char* sub);
+/* FIXME the next three don't have anything to do with high scores */
+/* and don't really belong here: */
int Standby(const char* heading, const char* sub);
int detecting_servers(const char* heading, const char* sub);
int Ready(const char* heading);
Modified: tuxmath/trunk/src/menu.c
===================================================================
--- tuxmath/trunk/src/menu.c 2009-10-26 16:55:35 UTC (rev 1606)
+++ tuxmath/trunk/src/menu.c 2009-10-26 16:55:42 UTC (rev 1607)
@@ -371,7 +371,8 @@
break;
case RUN_INFO:
- ShowMessage(_("TuxMath is free and open-source!"),
+ ShowMessage(DEFAULT_MENU_FONT_SIZE,
+ _("TuxMath is free and open-source!"),
_("You can help make it better."),
_("Suggestions, artwork, and code are all welcome!"),
_("Discuss TuxMath at tuxmath-devel at lists.sourceforge.net"));
@@ -499,7 +500,7 @@
s2 = _("to create customized game!");
s3 = _("Press a key or click your mouse to start game.");
s4 = _("See README.txt for more information");
- ShowMessage(s1, s2, s3, s4);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE, s1, s2, s3, s4);
if (read_user_config_file()) {
if (Opts_GetGlobalOpt(MENU_MUSIC))
@@ -585,7 +586,8 @@
/* For now, only allow one server instance: */
if(ServerRunning())
{
- ShowMessage(_("The server is already running"), NULL, NULL, NULL);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE, _("The server is already running"),
+ NULL, NULL, NULL);
return 0;
}
@@ -602,7 +604,9 @@
#ifdef HAVE_PTHREAD_H
- ShowMessage(_("Click or press key to select server lesson file"), NULL, NULL, NULL);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE,
+ _("Click or press key to select server lesson file"),
+ NULL, NULL, NULL);
{
chosen_lesson = run_menu(menus[MENU_LESSONS], true);
@@ -629,7 +633,8 @@
}
}
- ShowMessage(_("Server Name:"),
+ ShowMessage(DEFAULT_MENU_FONT_SIZE,
+ _("Server Name:"),
server_name,
_("Selected Lesson:"),
lesson_list_titles[chosen_lesson]);
@@ -675,17 +680,20 @@
}
else
{
- ShowMessage(NULL, _("Sorry, game already in progress."), NULL, NULL);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE,
+ NULL, _("Sorry, game already in progress."), NULL, NULL);
printf(_("Sorry, game already in progress.\n"));
}
}
else
{
- ShowMessage(NULL, _("Sorry, no server could be found."), NULL, NULL);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE,
+ NULL, _("Sorry, no server could be found."), NULL, NULL);
printf(_("Sorry, no server could be found.\n"));
}
#else
- ShowMessage(NULL, _("Sorry, this version built without network support"), NULL, NULL);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE,
+ NULL, _("Sorry, this version built without network support"), NULL, NULL);
printf( _("Sorry, this version built without network support.\n"));
#endif
Modified: tuxmath/trunk/src/titlescreen.c
===================================================================
--- tuxmath/trunk/src/titlescreen.c 2009-10-26 16:55:35 UTC (rev 1606)
+++ tuxmath/trunk/src/titlescreen.c 2009-10-26 16:55:42 UTC (rev 1607)
@@ -480,15 +480,15 @@
s3 = _("Discuss the future of TuxMath at");
s4 = N_("tuxmath-devel at lists.sourceforge.net");
- ShowMessage(s1, s2, s3, s4);
+ ShowMessage(DEFAULT_MENU_FONT_SIZE, s1, s2, s3, s4);
}
-/* FIXME add some background shading to improve legibility */
-void ShowMessage(const char* str1, const char* str2, const char* str3, const char* str4)
+void ShowMessage(int font_size, const char* str1, const char* str2,
+ const char* str3, const char* str4)
{
SDL_Surface *s1, *s2, *s3, *s4;
SDL_Rect loc;
@@ -503,13 +503,13 @@
DEBUGMSG(debug_titlescreen, "ShowMessage() - creating text\n" );
if (str1)
- s1 = BlackOutline(str1, DEFAULT_MENU_FONT_SIZE * scale, &white);
+ s1 = BlackOutline(str1, font_size * scale, &white);
if (str2)
- s2 = BlackOutline(str2, DEFAULT_MENU_FONT_SIZE * scale, &white);
+ s2 = BlackOutline(str2, font_size * scale, &white);
if (str3)
- s3 = BlackOutline(str3, DEFAULT_MENU_FONT_SIZE * scale, &white);
+ s3 = BlackOutline(str3, font_size * scale, &white);
if (str4)
- s4 = BlackOutline(str4, DEFAULT_MENU_FONT_SIZE * scale, &white);
+ s4 = BlackOutline(str4, font_size * scale, &white);
DEBUGMSG(debug_titlescreen, "ShowMessage() - drawing screen\n" );
Modified: tuxmath/trunk/src/titlescreen.h
===================================================================
--- tuxmath/trunk/src/titlescreen.h 2009-10-26 16:55:35 UTC (rev 1606)
+++ tuxmath/trunk/src/titlescreen.h 2009-10-26 16:55:42 UTC (rev 1607)
@@ -102,7 +102,7 @@
void DrawTitleScreen(void);
int HandleTitleScreenEvents(const SDL_Event* evt);
void HandleTitleScreenAnimations();
-void ShowMessage(const char* str1, const char* str2, const char* str3, const char* str4);
+void ShowMessage(int font_size, const char* str1, const char* str2, const char* str3, const char* str4);
SDL_Surface* current_bkg(); //appropriate background for current video mode
More information about the Tux4kids-commits
mailing list