#include "maplist.qh"
#include <common/mapinfo.qh>
+#include "checkbox.qh"
#include "image.qh"
#include "textslider.qh"
#include "textlabel.qh"
me.TR(me);
me.TD(me, 10.5, 3, e = makeXonoticGametypeList());
- me.gotoRC(me, 12.5, 0);
+ me.gotoRC(me, 12, 0);
+ me.TDempty(me, 0.1);
+ me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "menu_create_show_all", _("Show all"),
+ _("Show all available gametypes")));
+ me.gotoRC(me, 13.5, 0);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time limit:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("timelimit_override",
_("Timelimit in minutes that when hit, will end the match")));
me.TD(me, 1, 1, me.labelFraglimit = makeXonoticTextLabel(0, _("Frag limit:")));
me.TD(me, 1, 2, e = me.sliderFraglimit = makeXonoticTextSlider("fraglimit_override"));
- me.gotoRC(me, 15, 0);
+ me.gotoRC(me, 16, 0);
me.TD(me, 1, 1, me.labelTeams = makeXonoticTextLabel(0, _("Teams:")));
me.TD(me, 1, 2, e = me.sliderTeams = makeXonoticTextSlider(string_null));
e.addValue(e, _("Default"), "0");
e.configureXonoticTextSliderValues(e);
setDependentAND(e, "bot_number", 0, -1, "g_campaign", 0, 0);
- me.gotoRC(me, me.rows - 3.8, 0);
- me.TD(me, 1, 3, e0 = makeXonoticTextLabel(0.5, string_null));
- e0.textEntity = main.mutatorsDialog;
- e0.allowCut = 1;
- //e0.allowWrap = 1;
- setDependent(e0, "g_campaign", 0, 0);
-
// mapListBox is in the right column but the ref is needed for mutators dialog here
me.mapListBox = makeXonoticMapList();
// here we use the following line instead of me.TR(me) for better visual spacing;
loadAllCvars(me);
}
-string weaponarenastring;
-string weaponarenastring_cvar;
-string WeaponArenaString()
-{
- string s;
- float n;
- s = cvar_string("g_weaponarena");
- if(s == "0" || s == "") return "";
- if(s == "all" || s == "1") return _("All Weapons Arena");
- if(s == "all_available") return _("All Available Weapons Arena");
- if(s == "most") return _("Most Weapons Arena");
- if(s == "most_available") return _("Most Available Weapons Arena");
- if(s == "devall") return "Dev All Weapons Arena"; // development option, do not translate
- if(s == "devall_available") return "Dev All Available Weapons Arena"; // development option, do not translate
- if(s == weaponarenastring_cvar)
- return weaponarenastring;
-
- strcpy(weaponarenastring_cvar, s);
-
- n = tokenize_console(s);
- s = "";
- for(int j = 0; j < n; ++j)
- {
- Weapon wep = Weapon_from_name(argv(j));
- if(wep != WEP_Null)
- {
- s = cons_mid(s, " & ", wep.m_name);
- }
- }
- if (s != "")
- s = sprintf(_("%s Arena"), s);
- else
- s = _("No Weapons Arena");
-
- strcpy(weaponarenastring, s);
-
- return weaponarenastring;
-}
-
-string XonoticMutatorsDialog_toString(entity me)
-{
- string s = build_mutator_list("");
- if(cvar_string("g_weaponarena") != "0")
- s = cons_mid(s, ", ", WeaponArenaString());
- if(s == "")
- return ZCTX(_("MUT^None"));
- else
- return s;
-}
-
float checkCompatibility_pinata(entity me)
{
if(cvar("g_instagib"))
#include "dialog.qh"
CLASS(XonoticMutatorsDialog, XonoticDialog)
- METHOD(XonoticMutatorsDialog, toString, string(entity));
METHOD(XonoticMutatorsDialog, fill, void(entity));
METHOD(XonoticMutatorsDialog, showNotify, void(entity));
METHOD(XonoticMutatorsDialog, close, void(entity));
ATTRIB(XonoticGametypeList, columnNameSize, float, 0);
ENDCLASS(XonoticGametypeList)
entity makeXonoticGametypeList();
+
+bool autocvar_menu_create_show_all;
#include <common/gamemodes/_mod.qh>
#include <common/util.qh>
#include <common/command/_mod.qh>
+#include <menu/xonotic/gametypelist.qh>
float GL_CheckExtension(string ext)
{
int GameType_GetCount()
{
int i = 0;
- int dev = cvar("developer");
+ bool showall = autocvar_menu_create_show_all;
#define GAMETYPE(id) ++i;
GAMETYPES
#undef GAMETYPE
- #define GAMETYPE(it) { if (dev > 0) ++i; }
+ #define GAMETYPE(it) { if (showall) ++i; }
HIDDEN_GAMETYPES
#undef GAMETYPE
return i;
set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
set menu_showboxes 0 "show item bounding boxes (debug)"
set menu_cvarlist_onlymodified 0 "show only modified cvars in the cvar list"
+seta menu_create_show_all 0 "show most gametypes in the create menu"
set menu_no_music_nor_welcome 0 "don't play the menu music and skip the welcome announcer"