fix doubleclick on a language in misc
authorRudolf Polzer <divverent@alientrap.org>
Tue, 18 Jan 2011 18:27:24 +0000 (19:27 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 18 Jan 2011 18:27:24 +0000 (19:27 +0100)
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/languagelist.c

index 478dc39bc4b289fd07f07768f2709dcf5cd42de9..71cc021b5ae9cb239afec9395a46e3e2c3f43922 100644 (file)
@@ -835,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();
index 97bbfed46ba7d2ef08708ccb2b0a47246f12950d..0ea54dbcaffa1cb2fc29fae26a229095df2298c7 100644 (file)
@@ -26,6 +26,7 @@ CLASS(XonoticLanguageList) EXTENDS(XonoticListBox)
        METHOD(XonoticLanguageList, languageParameter, string(entity, float, float))
 
        ATTRIB(XonoticLanguageList, name, string, "languageselector") // change this to make it noninteractive (for first run dialog)
+
        ATTRIB(XonoticLanguageList, doubleClickCommand, string, "menu_restart\ntogglemenu\ndefer 0.1 \"menu_cmd languageselect\"")
 ENDCLASS(XonoticLanguageList)