-#ifdef INTERFACE
-CLASS(XonoticServerCreateTab) EXTENDS(XonoticTab)
+#ifndef DIALOG_MULTIPLAYER_CREATE_H
+#define DIALOG_MULTIPLAYER_CREATE_H
+#include "tab.qc"
+CLASS(XonoticServerCreateTab, XonoticTab)
METHOD(XonoticServerCreateTab, fill, void(entity))
METHOD(XonoticServerCreateTab, gameTypeChangeNotify, void(entity))
METHOD(XonoticServerCreateTab, gameTypeSelectNotify, void(entity))
- ATTRIB(XonoticServerCreateTab, title, string, _("Create"))
ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
ATTRIB(XonoticServerCreateTab, rows, float, 23)
ATTRIB(XonoticServerCreateTab, columns, float, 6.2) // added extra .2 for center space
{
e.configureXonoticTextSlider(e, string_null);
l.setText(l, pLabel);
- e.disabled = l.disabled = TRUE;
+ e.disabled = l.disabled = true;
}
else
{
e.configureXonoticTextSlider(e, pCvar);
-
+
// clear old values
- float i;
+ int i;
for(i = 0; i <= e.nValues; ++i);
{
if(e.(valueStrings[i])) { strunzone(e.(valueStrings[i])); }
// set text field
l.setText(l, pLabel);
- e.disabled = l.disabled = FALSE;
+ e.disabled = l.disabled = false;
}
}
entity makeXonoticServerCreateTab()
{
entity me;
- me = spawnXonoticServerCreateTab();
+ me = NEW(XonoticServerCreateTab);
me.configureDialog(me);
return me;
}
case MAPINFO_TYPE_ONSLAUGHT: GameType_ConfigureSliders(e, l, _("Point limit:"), 50, 500, 10, ""); break;
case MAPINFO_TYPE_CTS: GameType_ConfigureSliders(e, l, _("Point limit:"), 50, 500, 10, ""); break;
case MAPINFO_TYPE_INVASION: GameType_ConfigureSliders(e, l, _("Point limit:"), 5, 0, 5, ""); break;
+ case MAPINFO_TYPE_TEAM_DEATHMATCH:GameType_ConfigureSliders(e, l, _("Point limit:"), 5, 100, 5, "g_tdm_point_limit"); break;
default: GameType_ConfigureSliders(e, l, _("Frag limit:"), 5, 100, 5, "fraglimit_override"); break;
}