X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fdialog_teamselect.qc;h=15e023f79a2356106696dac0933183b663872044;hb=7bcb3a89b3271e018da4d92437dc5ba125ea8698;hp=94093bb001024fd24de82b5afd7c5f364c442c61;hpb=473ffbade612c2abc9dbc1616a26b264eea3390a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/dialog_teamselect.qc b/qcsrc/menu/xonotic/dialog_teamselect.qc index 94093bb00..15e023f79 100644 --- a/qcsrc/menu/xonotic/dialog_teamselect.qc +++ b/qcsrc/menu/xonotic/dialog_teamselect.qc @@ -2,10 +2,9 @@ #define DIALOG_TEAMSELECT_H #include "rootdialog.qc" CLASS(XonoticTeamSelectDialog, XonoticRootDialog) - METHOD(XonoticTeamSelectDialog, fill, void(entity)); // to be overridden by user to fill the dialog with controls + METHOD(XonoticTeamSelectDialog, fill, void(entity)); METHOD(XonoticTeamSelectDialog, showNotify, void(entity)); - ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection")) // ;) - ATTRIB(XonoticTeamSelectDialog, tooltip, string, _("Join \"best\" team (auto-select) / Autoselect team (recommended)")) + ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection")) ATTRIB(XonoticTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) ATTRIB(XonoticTeamSelectDialog, intendedWidth, float, 0.4) ATTRIB(XonoticTeamSelectDialog, rows, float, 5) @@ -23,7 +22,7 @@ ENDCLASS(XonoticTeamSelectDialog) entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip) { entity b; - b = makeXonoticBigCommandButton(theName, theColor, commandtheName, 1); + b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, 1, theTooltip); return b; } entity makeTeamButton(string theName, vector theColor, string commandtheName) @@ -33,13 +32,14 @@ entity makeTeamButton(string theName, vector theColor, string commandtheName) void XonoticTeamSelectDialog_showNotify(entity me) { + SUPER(XonoticTeamSelectDialog).showNotify(me); float teams, nTeams; teams = cvar("_teams_available"); nTeams = 0; - me.team1.disabled = !(teams & 1); nTeams += !!(teams & 1); - me.team2.disabled = !(teams & 2); nTeams += !!(teams & 2); - me.team3.disabled = !(teams & 4); nTeams += !!(teams & 4); - me.team4.disabled = !(teams & 8); nTeams += !!(teams & 8); + me.team1.disabled = !(teams & 1); nTeams += boolean(teams & 1); + me.team2.disabled = !(teams & 2); nTeams += boolean(teams & 2); + me.team3.disabled = !(teams & 4); nTeams += boolean(teams & 4); + me.team4.disabled = !(teams & 8); nTeams += boolean(teams & 8); } void XonoticTeamSelectDialog_fill(entity me) @@ -47,7 +47,7 @@ void XonoticTeamSelectDialog_fill(entity me) entity e; me.TR(me); me.TD(me, 2, 4, e = makeTeamButton_T(_("join 'best' team (auto-select)"), '0 0 0', "cmd selectteam auto; cmd join", - _("Join 'best' team (auto-select) / Autoselect team (recommended)"))); + _("Autoselect team (recommended)"))); e.preferredFocusPriority = 1; me.TR(me); me.TR(me);