Better patch for using default system lang with workaround for
deb#792812 (hide "Setup Language" from Menu)
diff -ur tuxtype-1.8.3.orig/src/globals.h tuxtype-1.8.3/src/globals.h
--- tuxtype-1.8.3.orig/src/globals.h 2014-08-20 07:55:27.000000000 +0400
+++ tuxtype-1.8.3/src/globals.h 2015-11-05 23:44:49.000000000 +0300
@@ -117,7 +117,7 @@
#define DEFAULT_GAME_FONT "AndikaDesRevG.ttf"
#define DEFAULT_MENU_FONT_SIZE 20
#define GAME_FONT_SIZE 20
-#define DEFAULT_LOCALE "en_US.UTF-8"
+#define DEFAULT_LOCALE setlocale(LC_ALL, "")
#define DEFAULT_USE_ENGLISH 1
#define DEFAULT_FULLSCREEN 1
#define DEFAULT_SYS_SOUND 1
diff -ur tuxtype-1.8.3.orig/src/titlescreen.c tuxtype-1.8.3/src/titlescreen.c
--- tuxtype-1.8.3.orig/src/titlescreen.c 2014-08-20 07:55:27.000000000 +0400
+++ tuxtype-1.8.3/src/titlescreen.c 2015-11-05 23:50:41.000000000 +0300
@@ -63,6 +63,10 @@
static SDL_Rect spkrdest;
static SDL_Rect cursor;
+/* NOTE for 'depth', think pages like a restaurant menu, */
+/* not heirarchical depth - choice of term is misleading */
+int menu_depth=0; // how deep we are in the menu
+
/* Local function prototypes: */
static void show_logo(void);
static int load_media(void);
@@ -81,7 +85,7 @@
{0, CASCADE, LEVEL1, LEVEL1, EDIT_WORDLIST },
{0, LASER, LEVEL2, LEVEL2, PHRASE_TYPING },
{0, LESSONS, LEVEL3, LEVEL3, PROJECT_INFO },
- {0, OPTIONS, INSTRUCT, LEVEL4, SET_LANGUAGE },
+ {0, OPTIONS, INSTRUCT, LEVEL4, MAIN },
{0, QUIT_GAME, MAIN, MAIN, MAIN }};
/* --- menu icons --- */
@@ -90,8 +94,8 @@
{"", "cascade", "easy", "grade1_", "list" },
{"", "comet", "medium", "grade2_", "practice" },
{"", "lesson","hard", "grade3_", "keyboard" },
- {"", "tux_config", "tutor", "grade4_", "lang" },
- {"", "quit", "main", "main", "main" }};
+ {"", "tux_config", "tutor", "grade4_", "main" },
+ {"", "quit", "main", "main", "" }};
static const char* menu_text[] =
@@ -99,8 +103,8 @@
"",N_("Fish Cascade"),N_("Easy"),N_("Space Cadet"),N_("Edit Word Lists"),
"",N_("Comet Zap"),N_("Medium"),N_("Pilot"),N_("Phrase Typing"),
"",N_("Lessons"),N_("Hard"), N_("Ace"),N_("Project Info"),
- "", N_("Options"),N_("Instructions"),N_("Commander"),N_("Setup Language"),
- "", N_("Quit"),N_("Main Menu"),N_("Main Menu"),N_("Main Menu")};
+ "", N_("Options"),N_("Instructions"),N_("Commander"),N_("Main Menu"),
+ "", N_("Quit"),N_("Main Menu"),N_("Main Menu"),N_(" ")};
@@ -123,10 +127,6 @@
Uint32 frame = 0;
Uint32 start = 0;
- /* NOTE for 'depth', think pages like a restaurant menu, */
- /* not heirarchical depth - choice of term is misleading */
- int menu_depth; // how deep we are in the menu
-
int i, j, tux_frame = 0;
int done = 0;
int firstloop = 1;
@@ -968,6 +968,13 @@
/* --- setup location of button text --- */
text_dst[i].x = screen->w/2 - 70;
text_dst[i].y = text_dst[i - 1].y + 60;
+ if (menu_depth==OPTIONS_SUBMENU && i>=5){
+ menu_button[i].x = 0;
+ menu_button[i].y = 0;
+ menu_button[i].w = 0;
+ menu_button[i].h = 0;
+ break;
+ }
/* --- setup location of button background --- */
menu_button[i].x = menu_button[i - 1].x;