]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_multiplayer_create.qc
Transifex autosync
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_multiplayer_create.qc
index b2c8de1f780a677ef8f5fbedd1d41827ff001431..a343c546c28827ded6d7f5888db2e2d535f3a6eb 100644 (file)
@@ -14,6 +14,7 @@
 #include "mainwindow.qh"
 #include "button.qh"
 #include "commandbutton.qh"
+#include "leavematchbutton.qh"
 #include "inputbox.qh"
 
 void GameType_ConfigureSliders(entity me, string pLabel, float pMin, float pMax, float pStep, string pCvar, string tCvar, string pTooltip)
@@ -65,15 +66,6 @@ entity makeXonoticServerCreateTab()
        return me;
 }
 
-.entity quitGameButton;
-void XonoticServerCreateTab_draw(entity me)
-{
-       entity e = me.quitGameButton;
-       e.disabled = !(gamestatus & (GAME_ISSERVER | GAME_CONNECTED));
-       e.setText(e, quitGameButton_getText(e));
-       SUPER(XonoticServerCreateTab).draw(me);
-}
-
 void XonoticServerCreateTab_fill(entity me)
 {
        entity e, e0;
@@ -217,7 +209,7 @@ void XonoticServerCreateTab_fill(entity me)
        // bottom row
        me.gotoRC(me, me.rows - 1, 0);
                me.TDempty(me, me.columns * 1/12);
-               me.TD(me, 1, me.columns * 5/12, me.quitGameButton = makeXonoticCommandButton(string_null, '0 0 0', QUITGAME_CMD, 0));
+               me.TD(me, 1, me.columns * 5/12, e = makeXonoticLeaveMatchButton('0 0 0', 0));
                me.TD(me, 1, me.columns * 5/12, e = makeXonoticButton(_("Start multiplayer!"), '0 0 0'));
                        e.onClick = MapList_LoadMap;
                        e.onClickEntity = me.mapListBox;