#include "inputbox.qh"
#include "checkbox.qh"
#include "commandbutton.qh"
+#include "leavematchbutton.qh"
#include "button.qh"
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)
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;