X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_multiplayer_join.qc;h=02b6464f6a8018bdcdece83541ca7ba4fcb1685a;hb=060a811f3d8b7aaf8c15b5e450c9975e41a29922;hp=2c08476012d7c2975a10584c7ababdf225ee34c0;hpb=53a02e57ad049e2fc6733a2b16349b6a27501c8e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join.qc index 2c0847601..02b6464f6 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join.qc @@ -6,6 +6,7 @@ #include "inputbox.qh" #include "checkbox.qh" #include "commandbutton.qh" +#include "leavematchbutton.qh" #include "button.qh" entity makeXonoticServerListTab() @@ -18,18 +19,7 @@ entity makeXonoticServerListTab() void XonoticServerListTab_refresh(entity this, entity slist) { - bool clear = false; - slist.refreshServerList(slist, clear ? REFRESHSERVERLIST_RESET : REFRESHSERVERLIST_ASK); -} - -.entity quitGameButton; -void XonoticServerListTab_draw(entity me) -{ - entity e = me.quitGameButton; - e.disabled = !(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)); - e.setText(e, quitGameButton_getText(e)); - setZonedTooltip(e, quitGameButton_getTooltip(e), string_null); - SUPER(XonoticServerListTab).draw(me); + slist.refreshServerList(slist, REFRESHSERVERLIST_ASK); } void XonoticServerListTab_fill(entity me) @@ -99,7 +89,7 @@ void XonoticServerListTab_fill(entity me) e.onClickEntity = slist; slist.infoButton = e; me.TR(me); - me.TD(me, 1, me.columns * 0.5, me.quitGameButton = makeXonoticCommandButton(string_null, '0 0 0', QUITGAME_CMD, 0)); + me.TD(me, 1, me.columns * 0.5, e = makeXonoticLeaveMatchButton('0 0 0', 0)); me.TD(me, 1, me.columns * 0.5, e = makeXonoticButton(_("Join!"), '0 0 0')); e.onClick = ServerList_Connect_Click; e.onClickEntity = slist;