Xonotic
dialog_teamselect.qc File Reference
+ Include dependency graph for dialog_teamselect.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeTeamButton (string theName, vector theColor, string commandtheName)
 
entity makeTeamButton_T (string theName, vector theColor, string commandtheName, string theTooltip)
 
void XonoticTeamSelectDialog_fill (entity me)
 
void XonoticTeamSelectDialog_showNotify (entity me)
 

Function Documentation

◆ makeTeamButton()

entity makeTeamButton ( string  theName,
vector  theColor,
string  commandtheName 
)

Definition at line 11 of file dialog_teamselect.qc.

References makeTeamButton_T(), and string_null.

12 {
13  return makeTeamButton_T(theName, theColor, commandtheName, string_null);
14 }
entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip)
string string_null
Definition: nil.qh:9
+ Here is the call graph for this function:

◆ makeTeamButton_T()

entity makeTeamButton_T ( string  theName,
vector  theColor,
string  commandtheName,
string  theTooltip 
)

Definition at line 5 of file dialog_teamselect.qc.

References COMMANDBUTTON_CLOSE, entity(), and makeXonoticBigCommandButton_T().

Referenced by makeTeamButton(), and XonoticTeamSelectDialog_fill().

6 {
7  entity b;
8  b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, COMMANDBUTTON_CLOSE, theTooltip);
9  return b;
10 }
entity() spawn
#define COMMANDBUTTON_CLOSE
entity makeXonoticBigCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XonoticTeamSelectDialog_fill()

void XonoticTeamSelectDialog_fill ( entity  me)

Definition at line 28 of file dialog_teamselect.qc.

References entity(), and makeTeamButton_T().

29 {
30  entity e;
31  me.TR(me);
32  me.TD(me, 2, 4, e = makeTeamButton_T(_("join 'best' team (auto-select)"), '0 0 0', "cmd selectteam auto; cmd join",
33  _("Autoselect team (recommended)")));
34  e.preferredFocusPriority = 1;
35  me.TR(me);
36  me.TR(me);
37  me.TD(me, 2, 1, e = me.team1 = makeTeamButton(_("red"), '1 0.5 0.5', "cmd selectteam red; cmd join"));
38  me.TD(me, 2, 1, e = me.team2 = makeTeamButton(_("blue"), '0.5 0.5 1', "cmd selectteam blue; cmd join"));
39  me.TD(me, 2, 1, e = me.team3 = makeTeamButton(_("yellow"), '1 1 0.5', "cmd selectteam yellow; cmd join"));
40  me.TD(me, 2, 1, e = me.team4 = makeTeamButton(_("pink"), '1 0.5 1', "cmd selectteam pink; cmd join"));
41  me.TR(me);
42  me.TR(me);
43  me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", COMMANDBUTTON_CLOSE));
44 }
entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip)
entity() spawn
#define COMMANDBUTTON_CLOSE
entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags)
entity makeTeamButton(string theName, vector theColor, string commandtheName)
+ Here is the call graph for this function:

◆ XonoticTeamSelectDialog_showNotify()

void XonoticTeamSelectDialog_showNotify ( entity  me)

Definition at line 16 of file dialog_teamselect.qc.

References boolean, cvar(), SUPER, and teams.

17 {
18  SUPER(XonoticTeamSelectDialog).showNotify(me);
19  float teams, nTeams;
20  teams = cvar("_teams_available");
21  nTeams = 0;
22  me.team1.disabled = !(teams & 1); nTeams += boolean(teams & 1);
23  me.team2.disabled = !(teams & 2); nTeams += boolean(teams & 2);
24  me.team3.disabled = !(teams & 4); nTeams += boolean(teams & 4);
25  me.team4.disabled = !(teams & 8); nTeams += boolean(teams & 8);
26 }
#define SUPER(cname)
Definition: oo.qh:219
entity teams
Definition: main.qh:44
#define boolean(value)
Definition: bool.qh:9
+ Here is the call graph for this function: