case K_KP_ENTER:
case K_ENTER:
case K_SPACE:
- me.close(me);
+ XonoticCommandButton_Click(me.joinButton_ent, me);
return true;
default:
return SUPER(XonoticWelcomeDialog).keyDown(me, key, ascii, shift);
me.serverinfo_MOTD_ent.allowColors = true;
me.serverinfo_MOTD_ent.escapedNewLines = true;
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
- e.onClick = Dialog_Close;
- e.onClickEntity = me;
- e.preferredFocusPriority = 1;
+ me.TD(me, 1, me.columns / 2, me.joinButton_ent = makeXonoticCommandButton(_("join"), '0 1 0', "cmd join", COMMANDBUTTON_CLOSE));
+ me.joinButton_ent.preferredFocusPriority = 1;
+ me.TD(me, 1, me.columns / 2, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", COMMANDBUTTON_CLOSE));
}
//ATTRIB(XonoticWelcomeDialog, serverinfo_name_ent, entity, world);
ATTRIB(XonoticWelcomeDialog, serverinfo_MOTD, string, string_null);
ATTRIB(XonoticWelcomeDialog, serverinfo_MOTD_ent, entity, world);
+ ATTRIB(XonoticWelcomeDialog, joinButton_ent, entity, world);
ATTRIB(XonoticWelcomeDialog, requiresConnection, bool, true);
ENDCLASS(XonoticWelcomeDialog)