]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
fix doubleclick on a language in misc
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index fbdbdd2e7f7edd36b6a90f6ba243d03fc5768018..71cc021b5ae9cb239afec9395a46e3e2c3f43922 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();
 
@@ -834,7 +835,9 @@ void(string itemname) m_goto =
        }
        else
        {
-               e = findstring(NULL, name, itemname);
+               for(e = NULL; (e = findstring(e, name, itemname)); )
+                       if(e.classname != "vtbl")
+                               break;
                if(e)
                {
                        m_hide();
@@ -853,10 +856,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");
 }