]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
Add a small Menu game dialog that can be opened with F11
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index f374b0a10b2ec780c1252e1afc5ef348c0fe0b35..4030270d321b727222074e2d7fbe7ec1709446ef 100644 (file)
@@ -969,12 +969,16 @@ void m_goto(string itemname)
                if (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))
                {
                        m_hide();
+                       return;
                }
-               else
-               {
-                       m_activate_window(main.mainNexposee);
-                       m_display();
-               }
+               itemname = "nexposee";
+       }
+
+       if (itemname == "nexposee")
+       {
+               // unlike 'togglemenu 1', this closes modal and root dialogs if opened
+               m_activate_window(main.mainNexposee);
+               m_display();
        }
        else
        {