int tp = (cg_teamdamage_var == TD_OFF) ? 1 : 2;
	int skill = game_skill_var;

	Cbuf_AddText("disconnect; sv_progsname spprogs; gamedir qw; coop 1; deathmatch 0\n");
	Cbuf_AddText(va("teamplay %d; skill %d;maxclients %d;map start",
					tp,skill,coopmaxplayers));
	M_LeaveMenus();
}

static settings_page create_game_options;
static setting create_game_options_arr[] = {
	ADDSET_SEPARATOR("Bot Match"),
	ADDSET_CUSTOM	("Game Mode", M_CG_bm_type_r, M_CG_bm_type_t,
					 "Choose one of the three available game types"),
	ADDSET_CUSTOM	("Map", M_CG_bm_map_r, M_CG_bm_map_t, "Bots support only limit set of maps"),
	ADDSET_ACTION	("Start Bot Match", M_CG_BotMatch_Start, "Start the bot match"),

	ADDSET_SEPARATOR("Deathmatch"),
	ADDSET_INTNUMBER("Player slots", dm_maxplayers, 1, 32, 1),
	ADDSET_INTNUMBER("Spectator slots", dm_maxspectators, 0, 16, 1),
	ADDSET_CUSTOM	("Game Mode", M_CG_DM_game_mode_r, M_CG_DM_game_mode_t, "Game Mode"),
	ADDSET_INTNUMBER("Timelimit", dm_timelimit, 0, 60, 5),
	ADDSET_INTNUMBER("Fraglimit", dm_fraglimit, 0, 100, 10),
	ADDSET_CUSTOM	("Map Group", M_CG_game_map_group_r, M_CG_game_map_group_t, ""),
	/* ADDSET_CUSTOM	("Map", Menu_CG_map_r, Menu_CG_map_t, ""), */
	ADDSET_ACTION	("Start Deathmatch", Menu_CG_DM_StartGame,
					 "Start game with given parameters"),

	ADDSET_SEPARATOR("Cooperative"),
	ADDSET_CUSTOM	("Difficulty", M_CG_game_skill_r, M_CG_game_skill_t, 
					 "Monsters skill level"),
Beispiel #2
0
    // this will add top, left and bottom padding
    // right padding is not added because it causes annoying scrollbar behaviour
    // when mouse gets off the scrollbar to the right side of it
	w = vid.width - OPTPADDING; // here used to be a limit to 512x... size
	h = vid.height - OPTPADDING*2;
	x = OPTPADDING;
	y = OPTPADDING;

	CTab_Draw(&options_tab, x, y, w, h);
}

// MAIN TAB
setting settgeneral_arr[] = {
	ADDSET_BOOL		("Advanced Options", menu_advanced),
	ADDSET_ACTION	("Go To Console", Con_ToggleConsole_f, "Opens the console."),

	ADDSET_SEPARATOR("Basic Setup"),

	ADDSET_STRING	("Name", name),
	ADDSET_NUMBER	("View Size (fov)", scr_fov, 40, 140, 2),
	ADDSET_NAMED	("HUD Type", scr_newHud, hud_enum),
	ADDSET_NUMBER	("Crosshair", crosshair, 0, 7, 1),
	ADDSET_NUMBER	("Gamma", v_gamma, 0, 3, 0.05),
	ADDSET_NUMBER	("Mouse Sensitivity", sensitivity, 1, 20, 0.25), // My sens is 16, so maybe some people have it up to 20?
	ADDSET_CUSTOM	("Invert Mouse", InvertMouseRead, InvertMouseToggle, "Inverts the Y axis."),

	//Sound & Volume
	ADDSET_SEPARATOR("Sound & Volume"),
	ADDSET_NUMBER	("Primary Volume", s_volume, 0, 1, 0.05),
	ADDSET_ADVANCED_SECTION(),