]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_teamselect.qc
Merge branch 'master' into terencehill/lms_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_teamselect.qc
index 9185a1f6ea15f825caeed300e5f0e0bb63238cca..e23a8706ce624425bc9c6d8561878347210c52ab 100644 (file)
@@ -1,28 +1,11 @@
-#ifndef DIALOG_TEAMSELECT_H
-#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, showNotify, void(entity));
-       ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection")) // ;)
-       ATTRIB(XonoticTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
-       ATTRIB(XonoticTeamSelectDialog, intendedWidth, float, 0.4)
-       ATTRIB(XonoticTeamSelectDialog, rows, float, 5)
-       ATTRIB(XonoticTeamSelectDialog, columns, float, 4)
-       ATTRIB(XonoticTeamSelectDialog, name, string, "TeamSelect")
-       ATTRIB(XonoticTeamSelectDialog, team1, entity, NULL)
-       ATTRIB(XonoticTeamSelectDialog, team2, entity, NULL)
-       ATTRIB(XonoticTeamSelectDialog, team3, entity, NULL)
-       ATTRIB(XonoticTeamSelectDialog, team4, entity, NULL)
-       ATTRIB(XonoticTeamSelectDialog, requiresConnection, float, true)
-ENDCLASS(XonoticTeamSelectDialog)
-#endif
+#include "dialog_teamselect.qh"
+
+#include "bigcommandbutton.qh"
 
-#ifdef IMPLEMENTATION
 entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip)
 {
        entity b;
-       b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, 1, theTooltip);
+       b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, COMMANDBUTTON_CLOSE, theTooltip);
        return b;
 }
 entity makeTeamButton(string theName, vector theColor, string commandtheName)
@@ -57,8 +40,5 @@ void XonoticTeamSelectDialog_fill(entity me)
                me.TD(me, 2, 1, e = me.team4 = makeTeamButton(_("pink"), '1 0.5 1', "cmd selectteam pink; cmd join"));
        me.TR(me);
        me.TR(me);
-               me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", 1));
+               me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", COMMANDBUTTON_CLOSE));
 }
-#endif
-
-/* Click. The c-word is here so you can grep for it :-) */