]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
use the "contexts" to differentiate between different uses of the same word in some...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index c4797019fbec89a3ae60f3b7133f2bac8c717915..478dc39bc4b289fd07f07768f2709dcf5cd42de9 100644 (file)
@@ -21,6 +21,7 @@ void SUB_Null() { };
 void() m_init =
 {
        cvar_set("_menu_alpha", "0");
+       prvm_language = strzone(cvar_string("prvm_language"));
 
        check_unacceptable_compiler_bugs();
 
@@ -115,18 +116,18 @@ void() m_init_delayed =
        if(cvar_string("menu_skin") != "")
        {
                draw_currentSkin = strcat("gfx/menu/", cvar_string("menu_skin"));
-               fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+               fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
        }
        if(fh < 0)
        if(cvar_defstring("menu_skin") != "")
        {
                draw_currentSkin = strcat("gfx/menu/", cvar_defstring("menu_skin"));
-               fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+               fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
        }
        if(fh < 0)
        {
                draw_currentSkin = "gfx/menu/default";
-               fh = fopen(strcat(draw_currentSkin, "/skinvalues.txt"), FILE_READ);
+               fh = fopen(language_filename(strcat(draw_currentSkin, "/skinvalues.txt")), FILE_READ);
        }
        draw_currentSkin = strzone(draw_currentSkin);
        while((s = fgets(fh)))
@@ -853,10 +854,18 @@ void() m_goto_skin_selector =
        m_goto("skinselector");
 }
 
+void() m_goto_language_selector =
+{
+       if(!menuInitialized)
+               return;
+       // TODO add code to switch back to the language selector (no idea how to do it now)
+       m_goto("languageselector");
+}
+
 void() m_goto_video_settings =
 {
        if(!menuInitialized)
                return;
-       // TODO add code to switch back to the skin selector (no idea how to do it now)
+       // TODO add code to switch back to the video settings (no idea how to do it now)
        m_goto("videosettings");
 }