]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/menu_quit_game
authorterencehill <piuntn@gmail.com>
Sun, 13 Mar 2022 11:07:14 +0000 (12:07 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 13 Mar 2022 11:07:14 +0000 (12:07 +0100)
1  2 
commands.cfg
qcsrc/menu/xonotic/_mod.inc
qcsrc/menu/xonotic/_mod.qh
qcsrc/menu/xonotic/dialog_multiplayer_join.qc
qcsrc/menu/xonotic/mainwindow.qc
qcsrc/menu/xonotic/mainwindow.qh
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/serverlist.qh
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/util.qh

diff --cc commands.cfg
Simple merge
Simple merge
Simple merge
index 22853c9baa1664610fc5ac3092a0d9eb534e80aa,f5d2aca98e8c622028ff506228b05af6b0a8305c..2a100c5b45a5f173c53518e455d74d8c5a2c3954
@@@ -54,11 -59,44 +55,17 @@@ void MainWindow_draw(entity me
  {
        SUPER(MainWindow).draw(me);
  
-       if(me.dialogToShow)
-       {
-               DialogOpenButton_Click_withCoords(NULL, me.dialogToShow, '0 0 0', eX * conwidth + eY * conheight);
-               me.dialogToShow = NULL;
+       if (me.firstDraw) {
+               if (me.ToSDialog.shouldShow())
+               {
+                       me.ToSDialog.loadXonoticToS(me.ToSDialog);
+                       DialogOpenButton_Click_withCoords(NULL, me.ToSDialog, '0 0 0', eX * conwidth + eY * conheight);
+               }
+               else if(me.firstRunDialog.shouldShow())
+                       DialogOpenButton_Click_withCoords(NULL, me.firstRunDialog, '0 0 0', eX * conwidth + eY * conheight);
+               
+               me.firstDraw = false;
        }
 -
 -      //-------------------------------------
 -      // Part of Disconnect Dialog button:
 -      // In case of this function is recalling every time, need to use condition of visibility 
 -      
 -      if (me.disconnectDialogVisibility && !(gamestatus & (GAME_ISSERVER | GAME_CONNECTED))) 
 -      {
 -              // If gamestate is not "ingame" (and it is a first "frame" of drawing (or dialog is visible)), 
 -              // disconnect button is unnecessary, remove it
 -              me.removeItem(me.mainNexposee, me.disconnectDialog);
 -              me.disconnectDialogVisibility = 0;
 -
 -      } else if(!me.disconnectDialogVisibility && (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))) {
 -              
 -              // If gamestate is "ingame" (and dialog is not visible), 
 -              // make disconnect button visible
 -              entity n, i;
 -              n = me.mainNexposee;
 -              i = me.disconnectDialog;
 -              n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 -              n.setNexposee(n, i, '0.5 1.2 0.0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
 -              me.disconnectDialogVisibility = 1;
 -      }
 -
 -      // I haven't found the best solution for making button visible. 
 -      // Alpha channel is the worst thing, because dialog with alpha is also clickable
 -      //-------------------------------------
  }
  
  void DemoButton_Click(entity me, entity other)
@@@ -292,7 -343,5 +304,4 @@@ void MainWindow_configureMainWindow(ent
        me.moveItemAfter(me, n, NULL);
  
        me.initializeDialog(me, n);
-       if(cvar_string("_cl_name") == cvar_defstring("_cl_name"))
-               me.dialogToShow = me.firstRunDialog;
 -      me.disconnectDialogVisibility = 1;
  }
Simple merge
index d0a62668107b3c2834c67460af168cbe48944204,7d5d21e30df9c2653f448cced6b08c18d141fb43..e07081e542fc7f11b980c18cf25b0bc0f54c1a41
@@@ -530,9 -539,9 +539,8 @@@ void XonoticServerList_draw(entity me
                        me.nItems = itemcount;
                }
        }
-       else { me.nItems = gethostcachevalue(SLIST_HOSTCACHEVIEWCOUNT); }
  
        me.connectButton.disabled = (me.ipAddressBox.text == "");
 -      //me.disconnectButton.disabled = (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)));
        me.infoButton.disabled = !owned;
        me.favoriteButton.disabled = (me.ipAddressBox.text == "");
  
Simple merge
Simple merge
Simple merge