//-------------------------------------------------------------------------------------------
//
// Note:
// Much of the menu structure defined here is accessed internally by CCMDs
// and menu generation code. If you want to design your own menus make sure
// that they are named identically and that links to all important submenus
// are present.
//
//-------------------------------------------------------------------------------------------

DEFAULTLISTMENU
{
	Font "BigFont", "Untranslated"
	IfGame(Doom, Chex)
	{
		Selector "M_SKULL1", -32, -5
		Linespacing 16
		Font "BigFont", "Red"
	}
	IfGame(Strife)
	{
		Selector "M_CURS1", -28, -5
		Linespacing 19
	}
	IfGame(Heretic, Hexen)
	{
		Selector "M_SLCTR1", -28, -1
		Linespacing 20
	}
}

//-------------------------------------------------------------------------------------------
//
// The main menu. There's a lot of differences here between the games
//
//-------------------------------------------------------------------------------------------

LISTMENU "MainMenu"
{
	IfGame(Doom, Chex)
	{
		StaticPatch 94, 2, "M_DOOM"
		Position 97, 72
		IfOption(ReadThis)
		{
			Position 97, 64
		}
	}
	IfGame(Strife)
	{
		StaticPatch 84, 2, "M_STRIFE"
		Position 97, 45
	}
	IfGame(Heretic)
	{
		StaticPatch 88, 0, "M_HTIC"
		StaticPatch 40, 10, "M_SKL01"
		StaticPatch 232, 10, "M_SKL00"
		Position 110, 56
	}
	IfGame(Hexen)
	{
		StaticPatch 88, 0, "M_HTIC"
		StaticPatch 37, 80, "FBULB0"
		StaticPatch 278, 80, "FBULA0"
		Position 110, 56
	}

	IfGame(Doom, Strife, Chex)
	{
		PatchItem "M_NGAME", "n", "PlayerclassMenu"
		ifOption(SwapMenu)
		{
			PatchItem "M_LOADG", "l", "LoadGameMenu"
			PatchItem "M_SAVEG", "s", "SaveGameMenu"
			PatchItem "M_OPTION","o", "OptionsMenu"
		}
		else
		{
			PatchItem "M_OPTION","o", "OptionsMenu"
			PatchItem "M_LOADG", "l", "LoadGameMenu"
			PatchItem "M_SAVEG", "s", "SaveGameMenu"
		}
		ifOption(ReadThis)
		{
			PatchItem "M_RDTHIS","r", "ReadThisMenu"
		}
		PatchItem "M_QUITG", "q", "QuitMenu"
	}

	IfGame(Heretic, Hexen)
	{
		TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu"
		TextItem "$MNU_OPTIONS", "o", "OptionsMenu"
		TextItem "$MNU_GAMEFILES", "g", "GameFilesMenu"
		TextItem "$MNU_INFO", "i", "ReadThisMenu"
		TextItem "$MNU_QUITGAME", "q", "QuitMenu"
	}
}

//-------------------------------------------------------------------------------------------
//
// Important note about the following template menus:
// Don't even think about replacing them with something that's not an empty menu
// with some static elements only. Proper function is not guaranteed then.
//
//-------------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------------
//
// The player class menu
// The init code will set the first item to 'autoselect' if it's the only one.
//
//-------------------------------------------------------------------------------------------

ListMenu "PlayerclassMenu"
{
	IfGame(Doom, Heretic, Hexen, Strife)
	{
		NetgameMessage "$NEWGAME"
	}
	IfGame(Chex)
	{
		NetgameMessage "$CNEWGAME"
	}

	IfGame(Doom, Strife, Chex)
	{
		StaticTextCentered 160, 15, "$MNU_CHOOSECLASS"
		Position 48, 63
		PlayerDisplay 220, 63, "20 00 00", "80 00 40"
		MouseWindow 0, 220
	}
	IfGame(Heretic)
	{
		StaticTextCentered 160, 15, "$MNU_CHOOSECLASS"
		Position 80, 50
		PlayerDisplay 220, 50, "20 00 00", "80 00 40"
		MouseWindow 0, 220
	}
	IfGame(Hexen)
	{
		StaticText 34, 24, "$MNU_CHOOSECLASS"
		Position 66, 58
		PlayerDisplay 174, 8, "00 07 00", "40 53 40"
		MouseWindow 0, 174
	}
	// The rest of this menu will be set up based on the actual player definitions.
}

//-------------------------------------------------------------------------------------------
//
// The episode menu
// The init code will set the first item to 'autoselect' if it's the only one.
//
//-------------------------------------------------------------------------------------------

ListMenu "EpisodeMenu"
{
	IfGame(Doom, Heretic, Hexen, Strife)
	{
		NetgameMessage "$NEWGAME"
	}
	IfGame(Chex)
	{
		NetgameMessage "$CNEWGAME"
	}

	IfGame(Doom, Chex)
	{
		Position 48, 63
		StaticPatch 54, 38, "M_EPISOD"
	}
	IfGame(Strife)
	{
		Position 48, 63
		StaticText 54, 38, "$MNU_EPISODE"
	}
	IfGame(Heretic, Hexen)
	{
		Position 80, 50
	}
	// items will be filled in by MAPINFO
}

//-------------------------------------------------------------------------------------------
//
// The skill menu
// Most of this will be filled in at runtime
//
//-------------------------------------------------------------------------------------------

ListMenu "SkillMenu"
{

	IfGame(Doom, Chex)
	{
		StaticPatch 96, 14, "M_NEWG"
	}
	IfGame(Strife)
	{
		StaticPatch 96, 14, "M_NGAME"
	}
	IfGame(Doom, Strife, Chex)
	{
		StaticPatch 54, 38, "M_SKILL"
		Position 48, 63
	}
	IfGame (Heretic)
	{
		Position 38, 30
	}
	IfGame (Hexen)
	{
		StaticText 74, 16, "$MNU_CHOOSESKILL"
		Position 160, 44
		centermenu
	}
}

//-------------------------------------------------------------------------------------------
//
// Raven's game files menu
//
//-------------------------------------------------------------------------------------------

ListMenu "GameFilesMenu"
{
	Position 110, 60
	TextItem "$MNU_LOADGAME", "l", "LoadGameMenu"
	TextItem "$MNU_SAVEGAME", "s", "SaveGameMenu"
}

//-------------------------------------------------------------------------------------------
//
// Base definition for load game menu. Only the configurable part is done here
//
//-------------------------------------------------------------------------------------------

ListMenu "LoadGameMenu"
{
	IfGame(Doom, Heretic, Hexen, Strife)
	{
		NetgameMessage "$LOADNET"
	}
	IfGame(Chex)
	{
		NetgameMessage "$CLOADNET"
	}
	IfGame(Doom, Strife, Chex)
	{
		StaticPatchCentered 160, -20, "M_LOADG"
	}
	IfGame(Heretic, Hexen)
	{
		StaticTextCentered 160, -10, "$MNU_LOADGAME"
	}
	Position 80,54
	Class "LoadMenu"	// uses its own implementation
}

//-------------------------------------------------------------------------------------------
//
// Base definition for save game menu. Only the configurable part is done here
//
//-------------------------------------------------------------------------------------------

ListMenu "SaveGameMenu"
{
	IfGame(Doom, Strife, Chex)
	{
		StaticPatchCentered 160, -20, "M_SAVEG"
	}
	IfGame(Heretic, Hexen)
	{
		StaticTextCentered 160, -10, "$MNU_SAVEGAME"
	}
	Position 80,54
	Class "SaveMenu"	// uses its own implementation
}

//-------------------------------------------------------------------------------------------
//
// The option menu
//
//-------------------------------------------------------------------------------------------

OptionValue "YesNo"
{
	0, "$TXT_NO"
	1, "$TXT_YES"
}

OptionValue "NoYes"
{
	0, "$TXT_YES"
	1, "$TXT_NO"
}

OptionValue "OnOff"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_ON"
}

OptionValue "OffOn"
{
	0, "$OPTVAL_ON"
	1, "$OPTVAL_OFF"
}

OptionValue AutoOffOn
{
	-1, "$OPTVAL_AUTO"
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_ON"
}

OptionMenuSettings
{
	// These can be overridden if a different menu fonts requires it.
	Linespacing 8
	IfGame(Heretic, Hexen)
	{
		Linespacing 9
	}
}

DefaultOptionMenu
{
	Position -15
	IfGame(Heretic, Hexen)
	{
		Position -13
	}
}

OptionMenu "OptionsMenu" protected
{
	Title "$OPTMNU_TITLE"
	Submenu "$OPTMNU_CONTROLS",			"CustomizeControls"
	Submenu "$OPTMNU_MOUSE",			"MouseOptions"
	Submenu "$OPTMNU_JOYSTICK",			"JoystickOptions"
	StaticText " "
	Submenu "$OPTMNU_PLAYER",			"PlayerMenu"
	Submenu "$OPTMNU_GAMEPLAY",			"GameplayOptions"
	Submenu "$OPTMNU_COMPATIBILITY",	"CompatibilityOptions"
	Submenu "$OPTMNU_AUTOMAP",			"AutomapOptions"
	Submenu "$OPTMNU_HUD",				"HUDOptions"
	Submenu "$OPTMNU_MISCELLANEOUS",	"MiscOptions"
	Submenu "$OPTMNU_NETWORK",			"NetworkOptions"
	Submenu "$OPTMNU_SOUND",			"SoundOptions"
	Submenu "$OPTMNU_DISPLAY",			"VideoOptions"
	Submenu "$OPTMNU_VIDEO",			"VideoModeMenu"
	StaticText " "
	SafeCommand "$OPTMNU_DEFAULTS",	"reset2defaults"
	SafeCommand	"$OPTMNU_RESETTOSAVED",	"reset2saved"
	Command "$OPTMNU_CONSOLE",			"menuconsole"
}

//-------------------------------------------------------------------------------------------
//
// The player menu
//
//-------------------------------------------------------------------------------------------

OptionValue "Gender"
{
	0, "$OPTVAL_MALE"
	1, "$OPTVAL_FEMALE"
	2, "$OPTVAL_NEUTRAL"
	3, "$OPTVAL_OTHER"
}

ListMenu "PlayerMenu"
{
	StaticTextCentered 160, 6, "$MNU_PLAYERSETUP"
	Font "SmallFont"
	Linespacing 14
	Position 48, 36

	IfGame (Doom, Strife, Chex)
	{
		PlayerNameBox "$PLYRMNU_NAME", 0, "Playerbox"
		Selector "-", -16, -1
	}
	IfGame(Heretic, Hexen)
	{
		PlayerNameBox "$PLYRMNU_NAME", 5, "Playerbox"
		Selector "-", -16, 1
	}
	IfGame(Doom, Heretic, Strife, Chex)
	{
		MouseWindow 0, 220
		PlayerDisplay 220, 80, "20 00 00", "80 00 40", 1, "PlayerDisplay"
	}
	IfGame(Hexen)
	{
		MouseWindow 0, 220
		PlayerDisplay 220, 80, "00 07 00", "40 53 40", 1, "PlayerDisplay"
	}

	ValueText "$PLYRMNU_TEAM", "Team"
	ValueText "$PLYRMNU_PLAYERCOLOR", "Color"
	Linespacing 10
	Slider "$PLYRMNU_RED", "Red", 0, 255, 16
	Slider "$PLYRMNU_GREEN", "Green", 0, 255, 16
	Linespacing 14
	Slider "$PLYRMNU_BLUE", "Blue", 0, 255, 16
	ValueText "$PLYRMNU_PLAYERCLASS", "Class"
	ValueText "$PLYRMNU_PLAYERSKIN", "Skin"
	ValueText "$PLYRMNU_PLAYERGENDER", "Gender", "Gender"
	Slider "$PLYRMNU_AUTOAIM", "Autoaim", 0, 35, 1
	ValueText "$PLYRMNU_SWITCHONPICKUP", "Switch", "OffOn"
	ValueText "$PLYRMNU_ALWAYSRUN", "AlwaysRun", "OnOff"
	Class "PlayerMenu"
}

//-------------------------------------------------------------------------------------------
//
// Controls Menu
//
//-------------------------------------------------------------------------------------------

OptionMenu "CustomizeControls" protected
{
	Title "$CNTRLMNU_TITLE"
	ScrollTop 2
	StaticTextSwitchable 	"$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"
	StaticText 	""
	StaticText 	"$CNTRLMNU_CONTROLS", 1
	Control 	"$CNTRLMNU_ATTACK",					"+attack"
	Control 	"$CNTRLMNU_ALTATTACK",				"+altattack"
	Control 	"$CNTRLMNU_RELOAD",					"+reload"
	Control 	"$CNTRLMNU_ZOOM",					"+zoom"
	Control		"$CNTRLMNU_USER1",					"+user1"
	Control		"$CNTRLMNU_USER2",					"+user2"
	Control		"$CNTRLMNU_USER3",					"+user3"
	Control		"$CNTRLMNU_USER4",					"+user4"
	Control 	"$CNTRLMNU_USE",					"+use"
	Control 	"$CNTRLMNU_FORWARD",				"+forward"
	Control 	"$CNTRLMNU_BACK",					"+back"
	Control 	"$CNTRLMNU_MOVELEFT",				"+moveleft"
	Control 	"$CNTRLMNU_MOVERIGHT",				"+moveright"
	Control 	"$CNTRLMNU_TURNLEFT",				"+left"
	Control 	"$CNTRLMNU_TURNRIGHT",				"+right"
	Control		"$CNTRLMNU_TURN180",				"turn180"
	Control 	"$CNTRLMNU_JUMP",					"+jump"
	Control 	"$CNTRLMNU_CROUCH",					"+crouch"
	Control 	"$CNTRLMNU_TOGGLECROUCH",			"crouch"
	Control 	"$CNTRLMNU_MOVEUP",					"+moveup"
	Control 	"$CNTRLMNU_MOVEDOWN",				"+movedown"
	Control 	"$CNTRLMNU_LAND",					"land"
	Control 	"$CNTRLMNU_MOUSELOOK",				"+mlook"
	Control 	"$CNTRLMNU_KEYBOARDLOOK",			"+klook"
	Control 	"$CNTRLMNU_LOOKUP",					"+lookup"
	Control 	"$CNTRLMNU_LOOKDOWN",				"+lookdown"
	Control 	"$CNTRLMNU_CENTERVIEW",				"centerview"
	Control 	"$CNTRLMNU_RUN",					"+speed"
	Control 	"$CNTRLMNU_TOGGLERUN",				"toggle cl_run"
	Control 	"$CNTRLMNU_STRAFE",					"+strafe"
	Control 	"$CNTRLMNU_SCOREBOARD",				"+showscores"
	Control 	"$CNTRLMNU_TOGGLESCOREBOARD",		"togglescoreboard"
	StaticText 	""
	StaticText 	"$CNTRLMNU_CHAT", 1
	Control 	"$CNTRLMNU_SAY",					"messagemode"
	Control 	"$CNTRLMNU_TEAMSAY",				"messagemode2"
	StaticText 	""
	StaticText 	"$CNTRLMNU_WEAPONS", 1
	Control 	"$CNTRLMNU_NEXTWEAPON",				"weapnext"
	Control 	"$CNTRLMNU_PREVIOUSWEAPON",			"weapprev"
	Control		"$CNTRLMNU_SLOT1",					"slot 1"
	Control		"$CNTRLMNU_SLOT2",					"slot 2"
	Control		"$CNTRLMNU_SLOT3",					"slot 3"
	Control		"$CNTRLMNU_SLOT4",					"slot 4"
	Control		"$CNTRLMNU_SLOT5",					"slot 5"
	Control		"$CNTRLMNU_SLOT6",					"slot 6"
	Control		"$CNTRLMNU_SLOT7",					"slot 7"
	Control		"$CNTRLMNU_SLOT8",					"slot 8"
	Control		"$CNTRLMNU_SLOT9",					"slot 9"
	Control		"$CNTRLMNU_SLOT0",					"slot 0"
	StaticText 	""
	StaticText 	"$CNTRLMNU_INVENTORY", 1
	Control 	"$CNTRLMNU_USEITEM",				"invuse"
	Control 	"$CNTRLMNU_USEALLITEMS",			"invuseall"
	Control 	"$CNTRLMNU_NEXTITEM",				"invnext"
	Control 	"$CNTRLMNU_PREVIOUSITEM",			"invprev"
	Control 	"$CNTRLMNU_DROPITEM",				"invdrop"
	Control		"$CNTRLMNU_QUERYITEM",				"invquery"
	Control 	"$CNTRLMNU_DROPWEAPON",				"weapdrop"
	StaticText 	""
	StaticText 	"$CNTRLMNU_OTHER", 1
	Control 	"$CNTRLMNU_AUTOMAP",				"togglemap"
	Control 	"$CNTRLMNU_CHASECAM",				"chase"
	Control 	"$CNTRLMNU_COOPSPY",				"spynext"
	Control 	"$CNTRLMNU_SCREENSHOT",				"screenshot"
	Control  	"$CNTRLMNU_CONSOLE",				"toggleconsole"
	StaticText 	""
	StaticText 	"$CNTRLMNU_POPUPS", 1
	Control 	"$CNTRLMNU_MISSION",				"showpop 1"
	Control 	"$CNTRLMNU_KEYS",					"showpop 2"
	Control 	"$CNTRLMNU_STATS",					"showpop 3"
}

//-------------------------------------------------------------------------------------------
//
// Mouse Menu
//
//-------------------------------------------------------------------------------------------

OptionValue "Corners"
{
	-1, "$OPTVAL_OFF"
	0, "$OPTVAL_UPPERLEFT"
	1, "$OPTVAL_UPPERRIGHT"
	2, "$OPTVAL_LOWERLEFT"
	3, "$OPTVAL_LOWERRIGHT"
}

OptionValue "MenuMouse"
{
	0, "$TXT_NO"
	1, "$TXT_YES"
	2, "$OPTVAL_TOUCHSCREENLIKE"
}

OptionString "Cursors"
{
	"None", "$OPTVAL_DEFAULT"
	"cursor", "$OPTSTR_SIMPLEARROW"
	"doomcurs", "$OPTVAL_DOOM"
	"herecurs", "$OPTSTR_HERETIC"
	"hexncurs", "$OPTVAL_HEXEN"
	"strfcurs", "$OPTVAL_STRIFE"
	"chexcurs", "$OPTSTR_CHEX"
	"-", "$OPTSTR_SYSTEMCURSOR"
}

OptionMenu "MouseOptions" protected
{
	Title "$MOUSEMNU_TITLE"
	Option "$MOUSEMNU_ENABLEMOUSE",		"use_mouse", "YesNo"
	Option "$MOUSEMNU_MOUSEINMENU",		"m_use_mouse", "MenuMouse", "use_mouse"
	Option "$MOUSEMNU_SHOWBACKBUTTON",	"m_show_backbutton", "Corners", "use_mouse"
	Option "$MOUSEMNU_CURSOR",			"vid_cursor", "Cursors"
	StaticText 	""
	Slider "$MOUSEMNU_SENSITIVITY",		"mouse_sensitivity", 0.5, 2.5, 0.1
	Option "$MOUSEMNU_NOPRESCALE",		"m_noprescale", "NoYes"
	Option "$MOUSEMNU_SMOOTHMOUSE",		"smooth_mouse", "YesNo"
	StaticText 	""
	Slider "$MOUSEMNU_TURNSPEED",		"m_yaw", 0, 2.5, 0.1
	Slider "$MOUSEMNU_MOUSELOOKSPEED",	"m_pitch", 0, 2.5, 0.1
	Slider "$MOUSEMNU_FORWBACKSPEED",	"m_forward", 0, 2.5, 0.1
	Slider "$MOUSEMNU_STRAFESPEED",		"m_side", 0, 2.5, 0.1
	StaticText 	""
	Option "$MOUSEMNU_ALWAYSMOUSELOOK",	"freelook", "OnOff"
	Option "$MOUSEMNU_INVERTMOUSE",		"invertmouse", "OnOff"
	Option "$MOUSEMNU_LOOKSPRING",		"lookspring", "OnOff"
	Option "$MOUSEMNU_LOOKSTRAFE",		"lookstrafe", "OnOff"
}


//-------------------------------------------------------------------------------------------
//
// Joystick Menu
//
//-------------------------------------------------------------------------------------------

OptionMenu "JoystickOptionsDefaults" protected
{
	Title "$JOYMNU_OPTIONS"
	Option "$JOYMNU_ENABLE", "use_joystick", "YesNo"
	Option "$JOYMNU_NOMENU", "m_blockcontrollers", "YesNo"
	IfOption(Windows)
	{
		Option "$JOYMNU_DINPUT", "joy_dinput", "YesNo"
		Option "$JOYMNU_XINPUT", "joy_xinput", "YesNo"
		Option "$JOYMNU_PS2", "joy_ps2raw", "YesNo"
	}
	StaticText ""
	StaticTextSwitchable "$JOYMNU_NOCON", "$JOYMNU_CONFIG", "ConfigureMessage"
	StaticTextSwitchable " ", "$JOYMNU_DISABLED1", "ConnectMessage1"
	StaticTextSwitchable " ", "$JOYMNU_DISABLED2", "ConnectMessage2"

	// The rest will be filled in by joystick code if devices get connected or disconnected
}

OptionMenu "JoystickOptions" protected
{
	Title "$JOYMNU_OPTIONS"
}

OptionValue "JoyAxisMapNames"
{
	-1, "$OPTVAL_NONE"
	0, "$OPTVAL_TURNING"
	1, "$OPTVAL_LOOKINGUPDOWN"
	2, "$OPTVAL_MOVINGFORWARD"
	3, "$OPTVAL_STRAFING"
	4, "$OPTVAL_MOVINGUPDOWN"
}

OptionValue "Inversion"
{
	0, "$OPTVAL_NOTINVERTED"
	1, "$OPTVAL_INVERTED"
}

OptionMenu "JoystickConfigMenu" protected
{
	Title "$JOYMNU_TITLE"
	Class "JoystickConfigMenu"
	// Will be filled in by joystick code.
}


//-------------------------------------------------------------------------------------------
//
// Video Menu
//
//-------------------------------------------------------------------------------------------

OptionValue ColumnMethods
{
	0.0, "$OPTVAL_ORIGINAL"
	1.0, "$OPTVAL_OPTIMIZED"
}

OptionValue BlendMethods
{
	0.0, "$OPTVAL_CLASSIC"
	1.0, "$OPTVAL_PRECISE"
}

OptionValue SkyModes
{
	0.0, "$OPTVAL_NORMAL"
	1.0, "$OPTVAL_STRETCH"
	2.0, "$OPTVAL_CAPPED"
}

OptionValue RocketTrailTypes
{
	0.0, "$OPTVAL_OFF"
	1.0, "$OPTVAL_PARTICLES"
	2.0, "$OPTVAL_SPRITES"
	3.0, "$OPTVAL_SPRITESPARTICLES"
}

OptionValue BloodTypes
{
	0.0, "$OPTVAL_SPRITES"
	1.0, "$OPTVAL_SPRITESPARTICLES"
	2.0, "$OPTVAL_PARTICLES"
}

OptionValue PuffTypes
{
	0.0, "$OPTVAL_SPRITES"
	1.0, "$OPTVAL_PARTICLES"
	2.0, "$OPTVAL_SPRITESPARTICLES"
}

OptionValue Wipes
{
	0.0, "$OPTVAL_NONE"
	1.0, "$OPTVAL_MELT"
	2.0, "$OPTVAL_BURN"
	3.0, "$OPTVAL_CROSSFADE"
}

OptionValue Endoom
{
	0.0, "$OPTVAL_OFF"
	1.0, "$OPTVAL_ON"
	2.0, "$OPTVAL_ONLYMODIFIED"
}

OptionValue Contrast
{
	0.0, "$OPTVAL_OFF"
	1.0, "$OPTVAL_ON"
	2.0, "$OPTVAL_SMOOTH"
}

OptionValue Fuzziness
{
	0.0, "$OPTVAL_TRANSLUCENT"
	1.0, "$OPTVAL_FUZZ"
	2.0, "$OPTVAL_SHADOW"
}

OptionValue VanillaTrans
{
	0.0, "$OPTVAL_VTFZDOOM"
	1.0, "$OPTVAL_VTFVANILLA"
	2.0, "$OPTVAL_VTAZDOOM"
	3.0, "$OPTVAL_VTAVANILLA"
}

OptionValue GPUSwitch
{
	0.0, "$OPTVAL_DEFAULT"
	1.0, "$OPTVAL_DEDICATED"
	2.0, "$OPTVAL_INTEGRATED"
}


OptionMenu "TrueColorOptions" protected
{
	Title "$TCMNU_TITLE"
	StaticText " "
	Option "$TCMNU_MINFILTER",				"r_minfilter", "OnOff"
	Option "$TCMNU_MAGFILTER",				"r_magfilter", "OnOff"
	Option "$TCMNU_MIPMAP",					"r_mipmap", "OnOff"
}

OptionMenu "SWROptions" protected
{
	Title "$DSPLYMNU_SWOPT"
	Submenu "$DSPLYMNU_TCOPT",			"TrueColorOptions"
	Option "$DSPLYMNU_BLENDMETHOD",				"r_blendmethod", "BlendMethods"
	StaticText " "
	Option "$DSPLYMNU_SKYMODE",					"r_skymode", "SkyModes"
	Option "$DSPLYMNU_LINEARSKY",				"r_linearsky", "OnOff"
	Option "$DSPLYMNU_GZDFULLBRIGHT",			"r_fullbrightignoresectorcolor", "OnOff"
	Option "$DSPLYMNU_SCALEFUZZ",				"r_fuzzscale", "OnOff"
	Option "$DSPLYMNU_MODELS",					"r_models", "OnOff"
}

OptionMenu "VideoOptions" protected
{
	Title "$DSPLYMNU_TITLE"

	Submenu "$DSPLYMNU_GLOPT", 			"OpenGLOptions"
	Submenu "$DSPLYMNU_SWOPT", 			"SWROptions"
	Submenu "$GLMNU_DYNLIGHT",			"GLLightOptions"
	Submenu "$DSPLYMNU_SCOREBOARD", 			"ScoreboardOptions"
	StaticText " "
	Slider "$DSPLYMNU_SCREENSIZE",				"screenblocks", 				3.0, 12.0, 1.0, 0

	Slider "$DSPLYMNU_GAMMA",					"Gamma",						0.75, 3.0, 0.05, 2
	Slider "$DSPLYMNU_BRIGHTNESS",				"vid_brightness",				-0.8,0.8, 0.05,2
	Slider "$DSPLYMNU_CONTRAST",				"vid_contrast",	   				0.1, 3.0, 0.1
	Slider "$DSPLYMNU_SATURATION",				"vid_saturation",  				-3.0, 3.0, 0.25, 2
	Option "$DSPLYMNU_HWGAMMA",					"vid_hwgamma", "HWGammaModes"
	StaticText " "
	Option "$DSPLYMNU_VSYNC",					"vid_vsync", "OnOff"
	Option "$DSPLYMNU_CAPFPS",					"cl_capfps", "OffOn"
	Slider "$DSPLYMNU_BLOODFADE",				"blood_fade_scalar", 0.0, 1.0, 0.05, 2
	Slider "$DSPLYMNU_PICKUPFADE",				"pickup_fade_scalar", 0.0, 1.0, 0.05, 2
	Slider "$DSPLYMNU_WATERFADE",				"underwater_fade_scalar", 0.0, 1.0, 0.05, 2

	StaticText " "
	Option "$DSPLYMNU_WIPETYPE",				"wipetype", "Wipes"

	IfOption(Windows)
	{
		Option	"$DSPLYMNU_SHOWENDOOM",			"showendoom", "Endoom"
	}

	Option "$DSPLYMNU_DRAWFUZZ",				"r_drawfuzz", "Fuzziness"
	Option "$DSPLYMNU_OLDTRANS",				"r_vanillatrans", "VanillaTrans"
	Slider "$DSPLYMNU_TRANSSOUL",				"transsouls", 0.25, 1.0, 0.05, 2
	Option "$DSPLYMNU_FAKECONTRAST",			"r_fakecontrast", "Contrast"
	Option "$DSPLYMNU_ROCKETTRAILS",			"cl_rockettrails", "RocketTrailTypes"
	Option "$DSPLYMNU_BLOODTYPE",				"cl_bloodtype", "BloodTypes"
	Option "$DSPLYMNU_PUFFTYPE",				"cl_pufftype", "PuffTypes"
	Slider "$DSPLYMNU_MAXPARTICLES",			"r_maxparticles", 100, 10000, 100, 0
	Slider "$DSPLYMNU_MAXDECALS",				"cl_maxdecals", 0, 10000, 100, 0
	Option "$DSPLYMNU_PLAYERSPRITES",			"r_drawplayersprites", "OnOff"
	Option "$DSPLYMNU_DEATHCAM",				"r_deathcamera", "OnOff"
	Option "$DSPLYMNU_TELEZOOM",				"telezoom", "OnOff"
	Slider "$DSPLYMNU_QUAKEINTENSITY",			"r_quakeintensity", 0.0, 1.0, 0.05, 2
	Option "$DSPLYMNU_NOMONSTERINTERPOLATION",	"nomonsterinterpolation", "NoYes"
	Slider "$DSPLYMNU_MENUDIM",					"dimamount", 0, 1.0, 0.05, 2
	ColorPicker "$DSPLYMNU_DIMCOLOR",			"dimcolor"
	Slider "$DSPLYMNU_MOVEBOB",			"movebob", 0, 1.0, 0.05, 2
	Slider "$DSPLYMNU_STILLBOB",		"stillbob", 0, 1.0, 0.05, 2
	Slider "$DSPLYMNU_BOBSPEED",				"wbobspeed", 0, 2.0, 0.1
	IfOption(Windows)
	{
		StaticText " "
		Option "$DSPLYMNU_GPUSWITCH",			vid_gpuswitch, "GPUSwitch"
	}
}

//-------------------------------------------------------------------------------------------
//
// HUD menu
//
//-------------------------------------------------------------------------------------------

OptionValue DisplayTagsTypes
{
	0.0, "$OPTVAL_NONE"
	1.0, "$OPTVAL_ITEMS"
	2.0, "$OPTVAL_WEAPONS"
	3.0, "$OPTVAL_BOTH"
}

OptionValue TextColors
{
	0.0, "$C_BRICK"
	1.0, "$C_TAN"
	2.0, "$C_GRAY"
	3.0, "$C_GREEN"
	4.0, "$C_BROWN"
	5.0, "$C_GOLD"
	6.0, "$C_RED"
	7.0, "$C_BLUE"
	8.0, "$C_ORANGE"
	9.0, "$C_WHITE"
	10.0, "$C_YELLOW"
	11.0, "$C_DEFAULT"
	12.0, "$C_BLACK"
	13.0, "$C_LIGHTBLUE"
	14.0, "$C_CREAM"
	15.0, "$C_OLIVE"
	16.0, "$C_DARKGREEN"
	17.0, "$C_DARKRED"
	18.0, "$C_DARKBROWN"
	19.0, "$C_PURPLE"
	20.0, "$C_DARKGRAY"
	21.0, "$C_CYAN"
	22.0, "$C_ICE"
	23.0, "$C_FIRE"
	24.0, "$C_SAPPHIRE"
	25.0, "$C_TEAL"
}

OptionValue Crosshairs
{
	// will be filled in from the XHAIRS lump
}

OptionValue ZDoomHexen
{
	0.0, "$OPTVAL_ZDOOM"
	1.0, "$OPTVAL_HEXEN"
}

OptionValue ZDoomStrife
{
	0.0, "$OPTVAL_ZDOOM"
	1.0, "$OPTVAL_STRIFE"
}

OptionMenu "HUDOptions" protected
{
	Title "$HUDMNU_TITLE"
	Submenu "$HUDMNU_SCALEOPT",				"ScalingOptions"
	Submenu "$HUDMNU_ALTHUD",				"AltHudOptions"
	Submenu "$HUDMNU_MESSAGE", 				"MessageOptions"
	StaticText " "
	Option "$HUDMNU_CROSSHAIR",				"crosshair", "Crosshairs"
	Option "$HUDMNU_FORCECROSSHAIR",		"crosshairforce", "OnOff"
	Option "$HUDMNU_GROWCROSSHAIR",			"crosshairgrow", "OnOff"
	ColorPicker "$HUDMNU_CROSSHAIRCOLOR", 	"crosshaircolor"
	Option "$HUDMNU_CROSSHAIRHEALTH",		"crosshairhealth", "OnOff"
	Slider "$HUDMNU_CROSSHAIRSCALE",		"crosshairscale", 0.0, 2.0, 0.05, 2
	StaticText " "
	Option "$HUDMNU_NAMETAGS",				"displaynametags", "DisplayTagsTypes"
	Option "$HUDMNU_NAMETAGCOLOR",			"nametagcolor", "TextColors", "displaynametags"
	Option "$HUDMNU_OLDOUCH",				"st_oldouch", "OnOff"
	StaticText " "
	Option "$HUDMNU_HEXENFLASHES",			"pf_hexenweaps", "ZDoomHexen"
	Option "$HUDMNU_POISONFLASHES",			"pf_poison", "ZDoomHexen"
	Option "$HUDMNU_ICEFLASHES",			"pf_ice", "ZDoomHexen"
	Option "$HUDMNU_HAZARDFLASHES",			"pf_hazard", "ZDoomStrife"
}

OptionMenu "ScalingOptions" protected
{
	Title "$SCALEMNU_TITLE"
	ScaleSlider "$HUDMNU_UISCALE",				"uiscale", 0.0, 8.0, 1.0, "$SCALEMNU_ADAPT"
	StaticText " "
	// These will need a new control type.
	StaticText "$SCALEMNU_OVERRIDE", 1
	ScaleSlider "$SCALEMNU_MESSAGES", 			"con_scaletext", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
	ScaleSlider "$SCALEMNU_CONSOLE", 			"con_scale", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
	ScaleSlider "$SCALEMNU_STATBAR",			"st_scale", -1.0, 8.0, 1.0, "$SCALEMNU_USEUI", "$SCALEMNU_USEFS"
	ScaleSlider "$SCALEMNU_HUD", 				"hud_scale", -1.0, 8.0, 1.0, "$SCALEMNU_USEUI", "$SCALEMNU_USEFS"
	ScaleSlider "$SCALEMNU_ALTHUD",				"hud_althudscale", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
	StaticText " "
	Option "$SCALEMNU_HUDASPECT", 				"hud_aspectscale", "OnOff"
}
//-------------------------------------------------------------------------------------------
//
// Alternative HUD
//
//-------------------------------------------------------------------------------------------

OptionValue "AMCoordinates"
{
	0, "$OPTVAL_PLAYER"
	1, "$OPTVAL_MAP"
}

OptionValue "AltHUDAmmo"
{
	0, "$OPTVAL_CURRENTWEAPON"
	1, "$OPTVAL_AVAILABLEWEAPONS"
	2, "$OPTVAL_ALLWEAPONS"
}

OptionValue "AltHUDTime"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_LEVELMILLISECONDS"
	2, "$OPTVAL_LEVELSECONDS"
	3, "$OPTVAL_LEVEL"
	4, "$OPTVAL_HUBSECONDS"
	5, "$OPTVAL_HUB"
	6, "$OPTVAL_TOTALSECONDS"
	7, "$OPTVAL_TOTAL"
	8, "$OPTVAL_SYSTEMSECONDS"
	9, "$OPTVAL_SYSTEM"
}

OptionValue "AltHUDLag"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_NETGAMESONLY"
	2, "$OPTVAL_ALWAYS"
}

OptionValue "AltHUDAmmoOrder"
{
	0, "$OPTVAL_AMMOIMAGETEXT"
	1, "$OPTVAL_AMMOTEXTIMAGE"
}

OptionMenu "AltHUDOptions" protected
{
	Title "$ALTHUDMNU_TITLE"
	//Indent 220
	Option "$ALTHUDMNU_ENABLE",					"hud_althud", "OnOff"
	Option "$ALTHUDMNU_SHOWSECRETS",			"hud_showsecrets", "OnOff"
	Option "$ALTHUDMNU_SHOWMONSTERS",			"hud_showmonsters", "OnOff"
	Option "$ALTHUDMNU_SHOWITEMS",				"hud_showitems", "OnOff"
	Option "$ALTHUDMNU_SHOWSTATS",				"hud_showstats", "OnOff"
	Option "$ALTHUDMNU_SHOWBERSERK",			"hud_berserk_health", "OnOff"
	Option "$ALTHUDMNU_SHOWWEAPONS",			"hud_showweapons", "OnOff"
	Option "$ALTHUDMNU_SHOWAMMO",				"hud_showammo", "AltHUDAmmo"
	Option "$ALTHUDMNU_SHOWTIME",				"hud_showtime", "AltHUDTime"
	Option "$ALTHUDMNU_TIMECOLOR",				"hud_timecolor", "TextColors"
	Option "$ALTHUDMNU_SHOWLAG",				"hud_showlag", "AltHUDLag"
	Option "$ALTHUDMNU_AMMOORDER",				"hud_ammo_order", "AltHUDAmmoOrder"
	Slider "$ALTHUDMNU_AMMORED",				"hud_ammo_red", 0, 100, 1, 0
	Slider "$ALTHUDMNU_AMMOYELLOW",				"hud_ammo_yellow", 0, 100, 1, 0
	Slider "$ALTHUDMNU_HEALTHRED",				"hud_health_red", 0, 100, 1, 0
	Slider "$ALTHUDMNU_HEALTHYELLOW",			"hud_health_yellow", 0, 100, 1, 0
	Slider "$ALTHUDMNU_HEALTHGREEN",			"hud_health_green", 0, 100, 1, 0
	Slider "$ALTHUDMNU_ARMORRED",				"hud_armor_red", 0, 100, 1, 0
	Slider "$ALTHUDMNU_ARMORYELLOW",			"hud_armor_yellow", 0, 100, 1, 0
	Slider "$ALTHUDMNU_ARMORGREEN",				"hud_armor_green", 0, 100, 1, 0
	StaticText " "
	StaticText "$ALTHUDMNU_AUTOMAPHUD", 1
	option "$ALTHUDMNU_TITLECOLOR",				"hudcolor_titl", "TextColors"
	option "$ALTHUDMNU_MAPTIMECOLOR",			"hudcolor_ltim", "TextColors"
	option "$ALTHUDMNU_HUBTIMECOLOR",			"hudcolor_time", "TextColors"
	option "$ALTHUDMNU_TOTALTIMECOLOR",			"hudcolor_ttim", "TextColors"
	option "$ALTHUDMNU_COORDINATECOLOR",		"hudcolor_xyco", "TextColors"
	option "$ALTHUDMNU_COORDINATEMODE",			"map_point_coordinates", "AMCoordinates"
	option "$ALTHUDMNU_STATSNAMECOLOR",			"hudcolor_statnames", "TextColors"
	option "$ALTHUDMNU_STATSCOLOR",				"hudcolor_stats", "TextColors"
}

//-------------------------------------------------------------------------------------------
//
// Misc menu
//
//-------------------------------------------------------------------------------------------

OptionValue Autosave
{
	0,	"$OPTVAL_ALWAYS"
	1,	"$OPTVAL_SCRIPTSONLY"
	2,	"$OPTVAL_NEVER"
}

OptionValue dehopt
{
	0,	"$OPTVAL_NEVER"
	1,	"$OPTVAL_ALL"
	2,	"$OPTVAL_ONLYLASTONE"
}

OptionMenu "MiscOptions" protected
{
	Title "$MISCMNU_TITLE"
	//Indent 220
	IfOption(Windows)
	{
		Option "$MISCMNU_MERGEKEYS", 			"k_mergekeys", "OnOff"
		Option "$MISCMNU_WINFULLSCREENTOGGLE",	"k_allowfullscreentoggle", "OnOff"
	}
	IfOption(Mac)
	{
		Option "$MISCMNU_MACFULLSCREENTOGGLE",	"k_allowfullscreentoggle", "OnOff"
	}
	Option "$MISCMNU_QUERYIWAD",				"queryiwad", "OnOff"
	StaticText " "
	Option "$MISCMNU_ALLCHEATS",				"allcheats", "OnOff"
	Option "$MISCMNU_ENABLEAUTOSAVES",			"disableautosave", "Autosave"
	Option "$MISCMNU_SAVELOADCONFIRMATION",			"saveloadconfirmation", "OnOff"
	Slider "$MISCMNU_AUTOSAVECOUNT",			"autosavecount", 1, 20, 1, 0
	Option "$MISCMNU_DEHLOAD",					"dehload", "dehopt"
	Option "$MISCMNU_INTERSCROLL",				"nointerscrollabort", "OffOn"
	StaticText " "
	Option "$MISCMNU_CACHENODES",				"gl_cachenodes", "OnOff"
	Slider "$MISCMNU_CACHETIME",				"gl_cachetime", 0.0, 2.0, 0.1
	SafeCommand "$MISCMNU_CLEARNODECACHE",		"clearnodecache"
}

//-------------------------------------------------------------------------------------------
//
// Automap Menu
//
//-------------------------------------------------------------------------------------------

OptionValue MapColorTypes
{
	0, "$OPTVAL_CUSTOM"
	1, "$OPTVAL_TRADITIONALDOOM"
	2, "$OPTVAL_TRADITIONALSTRIFE"
	3, "$OPTVAL_TRADITIONALRAVEN"
}

OptionValue SecretTypes
{
	0, "$OPTVAL_NEVER"
	1, "$OPTVAL_ONLYWHENFOUND"
	2, "$OPTVAL_ALWAYS"
}

OptionValue RotateTypes
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_ON"
	2, "$OPTVAL_ONFOROVERLAYONLY"
}

OptionValue OverlayTypes
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_OVERLAYNORMAL"
	2, "$OPTVAL_OVERLAYONLY"
}

OptionValue MaplabelTypes
{
	0, "$OPTVAL_NEVER"
	1, "$OPTVAL_ALWAYS"
	2, "$OPTVAL_NOTFORHUBS"
}

OptionValue STSTypes
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_FRONT"
	2, "$OPTVAL_ANIMATED"
	3, "$OPTVAL_ROTATED"
}

OptionValue MapBackTypes
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_ON"
	2, "$OPTVAL_MAPDEFINEDCOLORSONLY"
}

OptionValue MapTriggers
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_NODOORS"
	2, "$OPTVAL_ON"
}

OptionMenu AutomapOptions protected
{
	Title "$AUTOMAPMNU_TITLE"
	Option "$AUTOMAPMNU_COLORSET",				"am_colorset", "MapColorTypes"
	Option "$AUTOMAPMNU_CUSTOMCOLORS",			"am_customcolors", "YesNo"
	Submenu "$AUTOMAPMNU_SETCUSTOMCOLORS",		"MapColorMenu"
	Submenu "$AUTOMAPMNU_CONTROLS",				"MapControlsMenu"
	StaticText " "
	Option "$AUTOMAPMNU_ROTATE",				"am_rotate", "RotateTypes"
	Option "$AUTOMAPMNU_OVERLAY",				"am_overlay", "OverlayTypes"
	Option "$AUTOMAPMNU_TEXTURED",				"am_textured", "OnOff"
	Option "$AUTOMAPMNU_FOLLOW",				"am_followplayer", "OnOff"
	Option "$AUTOMAPMNU_PTOVERLAY",				"am_portaloverlay", "OnOff"
	Slider "$AUTOMAPMNU_EMPTYSPACEMARGIN",		"am_emptyspacemargin", 0, 90, 5, 0
	StaticText " "
	Option "$AUTOMAPMNU_SHOWITEMS",				"am_showitems", "OnOff"
	Option "$AUTOMAPMNU_SHOWMONSTERS",			"am_showmonsters", "OnOff"
	Option "$AUTOMAPMNU_SHOWSECRETS",			"am_showsecrets", "OnOff"
	Option "$AUTOMAPMNU_SHOWTIME",				"am_showtime", "OnOff"
	Option "$AUTOMAPMNU_SHOWTOTALTIME",			"am_showtotaltime", "OnOff"
	Option "$AUTOMAPMNU_MAPSECRETS",			"am_map_secrets", "SecretTypes"
	Option "$AUTOMAPMNU_SHOWMAPLABEL",			"am_showmaplabel", "MaplabelTypes"
	Option "$AUTOMAPMNU_DRAWMAPBACK",			"am_drawmapback", "MapBackTypes"
	Option "$AUTOMAPMNU_SHOWKEYS",				"am_showkeys", "OnOff"
	Option "$AUTOMAPMNU_SHOWTRIGGERLINES",		"am_showtriggerlines", "MapTriggers"
	Option "$AUTOMAPMNU_SHOWTHINGSPRITES",		"am_showthingsprites", "STSTypes"
}

//-------------------------------------------------------------------------------------------
//
// Automap Controls
//
//-------------------------------------------------------------------------------------------

OptionMenu MapControlsMenu protected
{
	Title "$MAPCNTRLMNU_TITLE"
	ScrollTop 2
	StaticTextSwitchable 	"$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"
	StaticText 	""
	StaticText "$MAPCNTRLMNU_CONTROLS", 1
	MapControl "$MAPCNTRLMNU_PANLEFT",			"+am_panleft"
	MapControl "$MAPCNTRLMNU_PANRIGHT",			"+am_panright"
	MapControl "$MAPCNTRLMNU_PANUP",			"+am_panup"
	MapControl "$MAPCNTRLMNU_PANDOWN",			"+am_pandown"
	MapControl "$MAPCNTRLMNU_ZOOMIN",			"+am_zoomin"
	MapControl "$MAPCNTRLMNU_ZOOMOUT",			"+am_zoomout"
	MapControl "$MAPCNTRLMNU_TOGGLEZOOM",		"am_gobig"
	MapControl "$MAPCNTRLMNU_TOGGLEFOLLOW",		"am_togglefollow"
	MapControl "$MAPCNTRLMNU_TOGGLEGRID",		"am_togglegrid"
	MapControl "$MAPCNTRLMNU_TOGGLETEXTURE",	"am_toggletexture"
	MapControl "$MAPCNTRLMNU_SETMARK",			"am_setmark"
	MapControl "$MAPCNTRLMNU_CLEARMARK",		"am_clearmarks"
}

//-------------------------------------------------------------------------------------------
//
// Automap Colors
//
//-------------------------------------------------------------------------------------------

OptionMenu MapColorMenu protected
{
	Title "$MAPCOLORMNU_TITLE"
	SafeCommand "$MAPCOLORMNU_DEFAULTMAPCOLORS", 		"am_restorecolors"
	StaticText " "
	ColorPicker "$MAPCOLORMNU_BACKCOLOR",				"am_backcolor"
	ColorPicker "$MAPCOLORMNU_YOURCOLOR",				"am_yourcolor"
	ColorPicker "$MAPCOLORMNU_WALLCOLOR",				"am_wallcolor"
	ColorPicker "$MAPCOLORMNU_FDWALLCOLOR",				"am_fdwallcolor"
	ColorPicker "$MAPCOLORMNU_CDWALLCOLOR",				"am_cdwallcolor"
	ColorPicker "$MAPCOLORMNU_EFWALLCOLOR",				"am_efwallcolor"
	ColorPicker "$MAPCOLORMNU_GRIDCOLOR",				"am_gridcolor"
	ColorPicker "$MAPCOLORMNU_XHAIRCOLOR",				"am_xhaircolor"
	ColorPicker "$MAPCOLORMNU_NOTSEENCOLOR",			"am_notseencolor"
	ColorPicker "$MAPCOLORMNU_LOCKEDCOLOR",				"am_lockedcolor"
	ColorPicker "$MAPCOLORMNU_INTRALEVELCOLOR",			"am_intralevelcolor"
	ColorPicker "$MAPCOLORMNU_INTERLEVELCOLOR",			"am_interlevelcolor"
	ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR",		"am_secretsectorcolor"
	ColorPicker "$MAPCOLORMNU_UNEXPLOREDSECRETCOLOR",	"am_unexploredsecretcolor"
	ColorPicker "$MAPCOLORMNU_SPECIALWALLCOLOR",		"am_specialwallcolor"
	ColorPicker "$MAPCOLORMNU_PORTAL",					"am_portalcolor"
	StaticText " "
	StaticText "$MAPCOLORMNU_CHEATMODE", 1
	ColorPicker "$MAPCOLORMNU_TSWALLCOLOR",				"am_tswallcolor"
	ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR",			"am_secretwallcolor"
	ColorPicker "$MAPCOLORMNU_THINGCOLOR",				"am_thingcolor"
	ColorPicker "$MAPCOLORMNU_MONSTERCOLOR",			"am_thingcolor_monster"
	ColorPicker "$MAPCOLORMNU_NONCOUNTINGMONSTERCOLOR",	"am_thingcolor_ncmonster"
	ColorPicker "$MAPCOLORMNU_FRIENDCOLOR",				"am_thingcolor_friend"
	ColorPicker "$MAPCOLORMNU_ITEMCOLOR",				"am_thingcolor_item"
	ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR",			"am_thingcolor_citem"
	StaticText " "
	StaticText "$MAPCOLORMNU_OVERLAY", 1
	ColorPicker "$MAPCOLORMNU_YOURCOLOR",				"am_ovyourcolor"
	ColorPicker "$MAPCOLORMNU_WALLCOLOR",				"am_ovwallcolor"
	ColorPicker "$MAPCOLORMNU_FDWALLCOLOR",				"am_ovfdwallcolor"
	ColorPicker "$MAPCOLORMNU_CDWALLCOLOR",				"am_ovcdwallcolor"
	ColorPicker "$MAPCOLORMNU_EFWALLCOLOR",				"am_ovefwallcolor"
	ColorPicker "$MAPCOLORMNU_NOTSEENCOLOR",			"am_ovunseencolor"
	ColorPicker "$MAPCOLORMNU_LOCKEDCOLOR",				"am_ovlockedcolor"
	ColorPicker "$MAPCOLORMNU_INTRALEVELCOLOR",			"am_ovtelecolor"
	ColorPicker "$MAPCOLORMNU_INTERLEVELCOLOR",			"am_ovinterlevelcolor"
	ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR",		"am_ovsecretsectorcolor"
	ColorPicker "$MAPCOLORMNU_SPECIALWALLCOLOR",		"am_ovspecialwallcolor"
	ColorPicker "$MAPCOLORMNU_PORTAL",					"am_ovportalcolor"
	StaticText " "
	StaticText "$MAPCOLORMNU_OVCHEATMODE", 1
	ColorPicker "$MAPCOLORMNU_TSWALLCOLOR",				"am_ovotherwallscolor"
	ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR",			"am_ovsecretwallcolor"
	ColorPicker "$MAPCOLORMNU_THINGCOLOR",				"am_ovthingcolor"
	ColorPicker "$MAPCOLORMNU_MONSTERCOLOR",			"am_ovthingcolor_monster"
	ColorPicker "$MAPCOLORMNU_NONCOUNTINGMONSTERCOLOR",	"am_ovthingcolor_ncmonster"
	ColorPicker "$MAPCOLORMNU_FRIENDCOLOR",				"am_ovthingcolor_friend"
	ColorPicker "$MAPCOLORMNU_ITEMCOLOR",				"am_ovthingcolor_item"
	ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR",			"am_ovthingcolor_citem"
}

//-------------------------------------------------------------------------------------------
//
// Color Picker
//
//-------------------------------------------------------------------------------------------

OptionMenu ColorPickerMenu protected
{
	Title "$MNU_COLORPICKER"
	// This menu will be created by the calling code
}

//-------------------------------------------------------------------------------------------
//
// Messages
//
//-------------------------------------------------------------------------------------------


OptionValue MessageLevels
{
	0.0, "$OPTVAL_ITEMPICKUP"
	1.0, "$OPTVAL_OBITUARIES"
	2.0, "$OPTVAL_CRITICALMESSAGES"
}

OptionValue DevMessageLevels
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_ERRORS"
	2, "$OPTVAL_WARNINGS"
	3, "$OPTVAL_NOTIFICATIONS"
	4, "$OPTVAL_EVERYTHING"
}

OptionMenu MessageOptions protected
{
	Title 	"$MSGMNU_TITLE"
	Option "$MSGMNU_SHOWMESSAGES",				"show_messages", "OnOff"
	Option "$MSGMNU_SHOWOBITUARIES",			"show_obituaries", "OnOff"
	Option "$MSGMNU_SHOWSECRETS",				"cl_showsecretmessage", "OnOff"
	Option "$MSGMNU_MESSAGELEVEL", 				"msg", "MessageLevels"
	Option "$MSGMNU_DEVELOPER", 				"developer", "DevMessageLevels"
	Option "$MSGMNU_CENTERMESSAGES",			"con_centernotify", "OnOff"
	StaticText " "
	StaticText "$MSGMNU_MESSAGECOLORS", 1
	StaticText " "
	Option "$MSGMNU_ITEMPICKUP",				"msg0color", "TextColors"
	Option "$MSGMNU_OBITUARIES",				"msg1color", "TextColors"
	Option "$MSGMNU_CRITICALMESSAGES",			"msg2color", "TextColors"
	Option "$MSGMNU_CHATMESSAGES",				"msg3color", "TextColors"
	Option "$MSGMNU_TEAMMESSAGES",				"msg4color", "TextColors"
	Option "$MSGMNU_CENTEREDMESSAGES",			"msgmidcolor", "TextColors"
	StaticText " "
	Option "$MSGMNU_SCREENSHOTMESSAGES",		"screenshot_quiet",	"OffOn"
	Option "$MSGMNU_LONGSAVEMESSAGES",			"longsavemessages",	"OnOff"
}

//-------------------------------------------------------------------------------------------
//
// Scoreboard
//
//-------------------------------------------------------------------------------------------

OptionMenu ScoreboardOptions protected
{
	Title "$SCRBRDMNU_TITLE"
	StaticText "$SCRBRDMNU_COOPERATIVE", 1
	StaticText " "
	Option "$SCRBRDMNU_ENABLE",				"sb_cooperative_enable", "YesNo"
	Option "$SCRBRDMNU_HEADERCOLOR",		"sb_cooperative_headingcolor", "TextColors"
	Option "$SCRBRDMNU_YOURCOLOR",			"sb_cooperative_yourplayercolor", "TextColors"
	Option "$SCRBRDMNU_OTHERPLAYERCOLOR",	"sb_cooperative_otherplayercolor", "TextColors"
	StaticText " "
	StaticText " "
	StaticText "$SCRBRDMNU_DEATHMATCH", 1
	StaticText " "
	Option "$SCRBRDMNU_ENABLE",				"sb_deathmatch_enable",	"YesNo"
	Option "$SCRBRDMNU_HEADERCOLOR",		"sb_deathmatch_headingcolor", "TextColors"
	Option "$SCRBRDMNU_YOURCOLOR",			"sb_deathmatch_yourplayercolor", "TextColors"
	Option "$SCRBRDMNU_OTHERPLAYERCOLOR",	"sb_deathmatch_otherplayercolor", "TextColors"
	StaticText " "
	StaticText " "
	StaticText "$SCRBRDMNU_TEAMDEATHMATCH", 1
	StaticText " "
	Option "$SCRBRDMNU_ENABLE",				"sb_teamdeathmatch_enable", "YesNo"
	Option "$SCRBRDMNU_HEADERCOLOR",		"sb_teamdeathmatch_headingcolor", "TextColors"
}

/*=======================================
 *
 * Gameplay Options (dmflags) Menu
 *
 *=======================================*/

OptionValue  SmartAim
{
	0.0, "$OPTVAL_OFF"
	1.0, "$OPTVAL_ON"
	2.0, "$OPTVAL_NEVERFRIENDS"
	3.0, "$OPTVAL_ONLYMONSTERS"
}

OptionValue  FallingDM
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_OLD"
	2, "$OPTVAL_HEXEN"
	3, "$OPTVAL_STRIFE"
}

OptionValue  JumpCrouchFreeLook
{
	0, "$OPTVAL_DEFAULT"
	1, "$OPTVAL_OFF"
	2, "$OPTVAL_ON"
}


OptionMenu GameplayOptions protected
{
	Title 	"$GMPLYMNU_TITLE"
	//Indent 222
	Option "$GMPLYMNU_TEAMPLAY",				"teamplay",	"OnOff"
	Slider	"$GMPLYMNU_TEAMDAMAGE",	"teamdamage", 0, 1, 0.05,2
	StaticText " "
	Option "$GMPLYMNU_SMARTAUTOAIM",			"sv_smartaim", "SmartAim"
	StaticText " "
	Option "$GMPLYMNU_FALLINGDAMAGE",			"sv_fallingdamage", "FallingDM"
	Option "$GMPLYMNU_DROPWEAPON",				"sv_weapondrop", "YesNo"
	Option "$GMPLYMNU_DOUBLEAMMO",				"sv_doubleammo", "YesNo"
	Option "$GMPLYMNU_INFINITEAMMO",			"sv_infiniteammo", "YesNo"
	Option "$GMPLYMNU_INFINITEINVENTORY",		"sv_infiniteinventory", "YesNo"
	Option "$GMPLYMNU_NOMONSTERS",				"sv_nomonsters", "YesNo"
	Option "$GMPLYMNU_NOMONSTERSTOEXIT",		"sv_killallmonsters", "YesNo"
	Option "$GMPLYMNU_MONSTERSRESPAWN",			"sv_monsterrespawn", "YesNo"
	Option "$GMPLYMNU_NORESPAWN",				"sv_norespawn", "YesNo"
	Option "$GMPLYMNU_ITEMSRESPAWN",			"sv_itemrespawn", "YesNo"
	Option "$GMPLYMNU_SUPERRESPAWN",			"sv_respawnsuper", "YesNo"
	Option "$GMPLYMNU_FASTMONSTERS",			"sv_fastmonsters", "YesNo"
	Option "$GMPLYMNU_DEGENERATION",			"sv_degeneration", "YesNo"
	Option "$GMPLYMNU_NOAUTOAIM",				"sv_noautoaim", "NoYes"
	Option "$GMPLYMNU_ALLOWSUICIDE",			"sv_disallowsuicide", "NoYes"
	Option "$GMPLYMNU_ALLOWJUMP",				"sv_jump", "JumpCrouchFreeLook"
	Option "$GMPLYMNU_ALLOWCROUCH",				"sv_crouch", "JumpCrouchFreeLook"
	Option "$GMPLYMNU_ALLOWFREELOOK",			"sv_freelook", "JumpCrouchFreeLook"
	Option "$GMPLYMNU_ALLOWFOV",				"sv_nofov", "NoYes"
	Option "$GMPLYMNU_BFGFREEAIM",				"sv_nobfgaim", "NoYes"
	Option "$GMPLYMNU_ALLOWAUTOMAP",			"sv_noautomap", "NoYes"
	Option "$GMPLYMNU_AUTOMAPALLIES",			"sv_noautomapallies", "NoYes"
	Option "$GMPLYMNU_ALLOWSPYING",				"sv_disallowspying", "NoYes"
	Option "$GMPLYMNU_CHASECAM",				"sv_chasecam", "YesNo"
	Option "$GMPLYMNU_DONTCHECKAMMO",			"sv_dontcheckammo", "NoYes"
	Option "$GMPLYMNU_KILLBOSSSPAWNS",			"sv_killbossmonst", "YesNo"
	Option "$GMPLYMNU_NOCOUNTENDMONSTER",		"sv_nocountendmonst", "NoYes"

	StaticText " "
	StaticText "$GMPLYMNU_DEATHMATCH",1
	Option "$GMPLYMNU_WEAPONSSTAY",				"sv_weaponstay", "YesNo"
	Option "$GMPLYMNU_ALLOWPOWERUPS",			"sv_noitems", "NoYes"
	Option "$GMPLYMNU_ALLOWHEALTH",				"sv_nohealth", "NoYes"
	Option "$GMPLYMNU_ALLOWARMOR",				"sv_noarmor", "NoYes"
	Option "$GMPLYMNU_SPAWNFARTHEST",			"sv_spawnfarthest", "YesNo"
	Option "$GMPLYMNU_SAMEMAP",					"sv_samelevel", "YesNo"
	Option "$GMPLYMNU_FORCERESPAWN",			"sv_forcerespawn", "YesNo"
	Option "$GMPLYMNU_ALLOWEXIT",				"sv_noexit", "NoYes"
	Option "$GMPLYMNU_BARRELSRESPAWN",			"sv_barrelrespawn", "YesNo"
	Option "$GMPLYMNU_RESPAWNPROTECTION",		"sv_respawnprotect", "YesNo"
	Option "$GMPLYMNU_LOSEFRAG",				"sv_losefrag", "YesNo"
	Option "$GMPLYMNU_KEEPFRAGS",				"sv_keepfrags", "YesNo"
	Option "$GMPLYMNU_NOTEAMSWITCH",			"sv_noteamswitch", "YesNo"

	StaticText " "
	StaticText "$GMPLYMNU_COOPERATIVE",1
	Option "$GMPLYMNU_MULTIPLAYERWEAPONS",	 	"sv_noweaponspawn", "NoYes"
	Option "$GMPLYMNU_LOSEINVENTORY",			"sv_cooploseinventory", "YesNo"
	Option "$GMPLYMNU_KEEPKEYS",				"sv_cooplosekeys", "NoYes"
	Option "$GMPLYMNU_KEEPWEAPONS",				"sv_cooploseweapons", "NoYes"
	Option "$GMPLYMNU_KEEPARMOR",				"sv_cooplosearmor", "NoYes"
	Option "$GMPLYMNU_KEEPPOWERUPS",			"sv_cooplosepowerups", "NoYes"
	Option "$GMPLYMNU_KEEPAMMO",				"sv_cooploseammo", "NoYes"
	Option "$GMPLYMNU_LOSEHALFAMMO",			"sv_coophalveammo", "YesNo"
	Option "$GMPLYMNU_SPAWNWHEREDIED",			"sv_samespawnspot", "YesNo"
	Class "GameplayMenu"
}

/*=======================================
 *
 * Compatibility Options Menu
 *
 *=======================================*/


OptionValue CompatModes
{
	0, "$OPTVAL_DEFAULT"
	1, "$OPTVAL_DOOM"
	2, "$OPTVAL_DOOMSTRICT"
	3, "$OPTVAL_BOOM"
	6, "$OPTVAL_BOOMSTRICT"
	5, "$OPTVAL_MBF"
	4, "$OPTVAL_ZDOOM2063"
}

OptionMenu "CompatibilityOptions" protected
{
	Title "$CMPTMNU_TITLE"
	Option "$CMPTMNU_MODE",							"compatmode", "CompatModes", "", 1

	StaticText " "
	StaticText "$CMPTMNU_ACTORBEHAVIOR",1
	Option "$CMPTMNU_CORPSEGIBS",					"compat_CORPSEGIBS", "YesNo"
	Option "$CMPTMNU_NOBLOCKFRIENDS",				"compat_NOBLOCKFRIENDS", "YesNo"
	Option "$CMPTMNU_LIMITPAIN",					"compat_LIMITPAIN", "YesNo"
	Option "$CMPTMNU_MBFMONSTERMOVE",				"compat_MBFMONSTERMOVE", "YesNo"
	Option "$CMPTMNU_CROSSDROPOFF",					"compat_CROSSDROPOFF", "YesNo"
	Option "$CMPTMNU_DROPOFF",						"compat_DROPOFF", "YesNo"
	Option "$CMPTMNU_INVISIBILITY",					"compat_INVISIBILITY", "YesNo"
	Option "$CMPTMNU_MINOTAUR",						"compat_MINOTAUR", "YesNo"
	Option "$CMPTMNU_NOTOSSDROPS",					"compat_NOTOSSDROPS", "YesNo"

	StaticText " "
	StaticText "$CMPTMNU_DEHACKEDBEHAVIOR",1
	Option "$CMPTMNU_DEHHEALTH",					"compat_DEHHEALTH", "YesNo"
	Option "$CMPTMNU_MUSHROOM",						"compat_MUSHROOM", "YesNo"

	StaticText " "
	StaticText "$CMPTMNU_MAPACTIONBEHAVIOR",1
	Option "$CMPTMNU_USEBLOCKING",					"compat_USEBLOCKING", "YesNo"
	Option "$CMPTMNU_ANYBOSSDEATH",					"compat_ANYBOSSDEATH", "YesNo"
	Option "$CMPTMNU_NODOORLIGHT",					"compat_NODOORLIGHT", "YesNo"
	Option "$CMPTMNU_LIGHT",						"compat_LIGHT", "YesNo"
	Option "$CMPTMNU_SHORTTEX",						"compat_SHORTTEX", "YesNo"
	Option "$CMPTMNU_STAIRS",						"compat_stairs", "YesNo"
	Option "$CMPTMNU_FLOORMOVE",					"compat_floormove", "YesNo"
	Option "$CMPTMNU_POINTONLINE",					"compat_pointonline", "YesNo"
	Option "$CMPTMNU_MULTIEXIT",					"compat_multiexit", "YesNo"
	Option "$CMPTMNU_TELEPORT",						"compat_teleport", "YesNo"
	Option "$CMPTMNU_PUSHWINDOW",					"compat_pushwindow", "YesNo"

	StaticText " "
	StaticText "$CMPTMNU_PHYSICSBEHAVIOR",1
	Option "$CMPTMNU_NOPASSOVER",					"compat_nopassover", "YesNo"
	Option "$CMPTMNU_BOOMSCROLL",					"compat_BOOMSCROLL", "YesNo"
	Option "$CMPTMNU_BADANGLES",					"compat_badangles", "YesNo"
	Option "$CMPTMNU_WALLRUN",						"compat_WALLRUN", "YesNo"
	Option "$CMPTMNU_RAVENSCROLL",					"compat_RAVENSCROLL", "YesNo"
	Option "$CMPTMNU_TRACE",						"compat_TRACE", "YesNo"
	Option "$CMPTMNU_HITSCAN",						"compat_HITSCAN", "YesNo"
	Option "$CMPTMNU_MISSILECLIP",					"compat_MISSILECLIP", "YesNo"


	StaticText " "
	StaticText "$CMPTMNU_RENDERINGBEHAVIOR",1
	Option "$CMPTMNU_POLYOBJ",						"compat_POLYOBJ", "YesNo"
	Option "$CMPTMNU_MASKEDMIDTEX",					"compat_MASKEDMIDTEX", "YesNo"
	Option "$CMPTMNU_SPRITESORT",					"compat_SPRITESORT", "YesNo"

	StaticText " "
	StaticText "$CMPTMNU_SOUNDBEHAVIOR",1
	Option "$CMPTMNU_SOUNDSLOTS",					"compat_soundslots", "YesNo"
	Option "$CMPTMNU_SILENTPICKUP",					"compat_SILENTPICKUP", "YesNo"
	Option "$CMPTMNU_SILENTINSTANTFLOORS",			"compat_silentinstantfloors", "YesNo"
	Option "$CMPTMNU_SECTORSOUNDS",					"compat_SECTORSOUNDS", "YesNo"
	Option "$CMPTMNU_SOUNDCUTOFF",					"compat_soundcutoff", "YesNo"
	Option "$CMPTMNU_SOUNDTARGET",					"compat_SOUNDTARGET", "YesNo"

	Class "CompatibilityMenu"
}

/*=======================================
 *
 * Sound Options Menu
 *
 *=======================================*/

OptionValue SampleRates
{
	0,		"$OPTVAL_DEFAULT"
	4000,	"$OPTVAL_4000HZ"
	8000,	"$OPTVAL_8000HZ"
	11025,	"$OPTVAL_11025HZ"
	22050,	"$OPTVAL_22050HZ"
	32000,	"$OPTVAL_32000HZ"
	44100,	"$OPTVAL_44100HZ"
	48000,	"$OPTVAL_48000HZ"
}


OptionValue BufferSizes
{
	   0, "$OPTVAL_DEFAULT"
	  64, "$OPTVAL_64SAMPLES"
	 128, "$OPTVAL_128SAMPLES"
	 256, "$OPTVAL_256SAMPLES"
	 512, "$OPTVAL_512SAMPLES"
	1024, "$OPTVAL_1024SAMPLES"
	2048, "$OPTVAL_2048SAMPLES"
	4096, "$OPTVAL_4096SAMPLES"
}


OptionValue BufferCounts
{
	   0, "$OPTVAL_DEFAULT"
	   2, "2"
	   3, "3"
	   4, "4"
	   5, "5"
	   6, "6"
	   7, "7"
	   8, "8"
	   9, "9"
	  10, "10"
	  11, "11"
	  12, "12"
}


OptionString SoundOutputsWindows
{
	"Default",		"$OPTVAL_DEFAULT"
	"DirectSound",	"$OPTSTR_DIRECTSOUND"
	"WASAPI",		"$OPTSTR_WASAPI"
	"ASIO",			"$OPTSTR_ASIO"
	"WaveOut",		"$OPTSTR_WAVEOUT"
	"No sound",		"$OPTSTR_NOSOUND"
}


OptionString SoundOutputsUnix
{
	"Default",		"$OPTVAL_DEFAULT"
	"OSS",			"$OPTSTR_OSS"
	"ALSA",			"$OPTSTR_ALSA"
	"SDL",			"$OPTSTR_SDL"
	"ESD",			"$OPTSTR_ESD"
	"PulseAudio",	"$OPTSTR_PULSEAUDIO"
	"No sound",		"$OPTSTR_NOSOUND"
}

OptionString SoundOutputsMac
{
	"Core Audio",		"$OPTSTR_COREAUDIO"
	"No sound",			"$OPTSTR_NOSOUND"
}

OptionString ALDevices
{
	// filled in by the sound code
}

OptionString ALResamplers
{
	// filled in by the sound code
}

OptionString SpeakerModes
{
	"Auto",		"$OPTSTR_AUTO"
	"Mono",		"$OPTSTR_MONO"
	"Stereo",	"$OPTSTR_STEREO"
	"Prologic",	"$OPTSTR_PROLOGIC"
	"Quad",		"$OPTSTR_QUAD"
	"Surround",	"$OPTSTR_SURROUND"
	"5.1",		"$OPTSTR_5POINT1"
	"7.1",		"$OPTSTR_7POINT1"
}


OptionString Resamplers
{
	"NoInterp",		"$OPTSTR_NOINTERPOLATION"
	"Linear",		"$OPTVAL_LINEAR"
	"Cubic",		"$OPTVAL_CUBIC"
	"Spline",		"$OPTSTR_SPLINE"
}


OptionMenu OpenALSoundItems protected
{
	Title "$OPENALMNU_TITLE"
	Option "$OPENALMNU_PLAYBACKDEVICE",		"snd_aldevice",		"ALDevices"
	Option "$OPENALMNU_ENABLEEFX",			"snd_efx",			"OnOff"
	Option "$OPENALMNU_RESAMPLER",			"snd_alresampler",	"ALResamplers"
}


OptionValue MidiDevices
{
	// filled in by the sound code
}

OptionMenu SoundOptions protected
{
	Title "$SNDMNU_TITLE"
	Slider "$SNDMNU_SFXVOLUME",			"snd_sfxvolume", 0, 1, 0.05, 2
	Slider "$SNDMNU_MENUVOLUME",		"snd_menuvolume", 0, 1, 0.05, 2
	Slider "$SNDMNU_MUSICVOLUME",		"snd_musicvolume", 0, 1, 0.05, 2
	Option "$SNDMNU_MIDIDEVICE",		"snd_mididevice", "MidiDevices"
	StaticText " "
	Option "$SNDMNU_UNDERWATERREVERB",	"snd_waterreverb", "OnOff"
	Option "$SNDMNU_RANDOMIZEPITCHES",	"snd_pitched", "OnOff"
	Slider "$SNDMNU_CHANNELS",			"snd_channels", 64, 256, 8, 0
	StaticText " "
	Submenu "$SNDMNU_ADVANCED",			"AdvSoundOptions"
	Submenu "$OPTMNU_REVERB",			"ReverbEdit"
}

/*=======================================
 *
 * Advanced Sound Options Menu
 *
 *=======================================*/

OptionValue GusMemory
{
	0, "$OPTVAL_UNLIMITED"
	1, "$OPTVAL_256K"
	2, "$OPTVAL_512K"
	3, "$OPTVAL_768K"
	4, "$OPTVAL_1024K"
}

OptionValue OplCores
{
	0, "$OPTVAL_MAMEOPL2"
	1, "$OPTVAL_DOSBOXOPL3"
	2, "$OPTVAL_JAVAOPL3"
	3, "$OPTVAL_NUKEDOPL3"
}


OptionMenu AdvSoundOptions protected
{
	Title "$ADVSNDMNU_TITLE"
	Option "$ADVSNDMNU_SAMPLERATE",			"snd_samplerate", "SampleRates"
	Option "$ADVSNDMNU_HRTF",				"snd_hrtf", "AutoOffOn"
	StaticText " "
	Option "$SNDMNU_BACKGROUND",			"i_soundinbackground", "OnOff"
	StaticText " "

	ifoption(openal)
	{
	StaticText " "
		Submenu "$SNDMNU_OPENAL",		"OpenALSoundItems"
	}

	StaticText " "
	Submenu "$SNDMNU_MIDIPLAYER",		"MidiPlayerOptions"
	Submenu "$SNDMNU_MODREPLAYER",		"ModReplayerOptions"
	StaticText " "
	Command "$SNDMNU_RESTART",			"snd_reset"
}

OptionMenu GusConfigMenu protected
{
	Title "$ADVSNDMNU_SELCONFIG"
}

OptionMenu WildMidiConfigMenu protected
{
	Title "$ADVSNDMNU_SELCONFIG"
}

OptionMenu TimidityConfigMenu protected
{
	Title "$ADVSNDMNU_SELCONFIG"
}

OptionMenu FluidPatchsetMenu protected
{
	Title "$ADVSNDMNU_SELCONFIG"
}

OptionMenu ADLBankMenu protected
{
	Title "$ADVSNDMNU_OPLBANK"
}

OptionMenu ADLMIDICustomBanksMenu protected
{
	Title "$ADVSNDMNU_OPLBANKFILE"
}

OptionMenu OPNMIDICustomBanksMenu protected
{
	Title "$ADVSNDMNU_OPNBANKFILE"
}


/*=======================================
 *
 * Module Replayer Options Menu
 *
 *=======================================*/

OptionValue ModReplayers
{
	0.0, "$OPTVAL_SOUNDSYSTEM"
	1.0, "$OPTVAL_FOO_DUMB"
}


OptionValue ModQuality
{
	0.0, "$OPTVAL_ALIASING"
	1.0, "$OPTVAL_LINEAR"
	2.0, "$OPTVAL_CUBIC"
	3.0, "$OPTVAL_BLEP"		// Band-limited step
	4.0, "$OPTVAL_LINEARSLOW"
	5.0, "$OPTVAL_BLAM"		// Band-limited linear
	6.0, "$OPTVAL_CUBICSLOW"
	7.0, "$OPTVAL_SINC"
}


OptionValue ModVolumeRamps
{
	0.0, "$OPTVAL_NONE"
	1.0, "$OPTVAL_NOTEONOFFONLY"
	2.0, "$OPTVAL_FULLRAMPING"
}



OptionMenu ModReplayerOptions protected
{
	Title "$MODMNU_TITLE"
	Slider "$MODMNU_MASTERVOLUME",			"mod_dumb_mastervolume", 1, 16, 0.5, 1
	Option "$ADVSNDMNU_SAMPLERATE",			"mod_samplerate", "SampleRates"
	Option "$MODMNU_QUALITY",				"mod_interp", "ModQuality"
	Option "$MODMNU_VOLUMERAMPING",			"mod_volramp", "ModVolumeRamps"
	StaticText " "
	Option "$MODMNU_CHIPOMATIC",			"mod_autochip", "OnOff"
	// TODO if the menu system is ever rewritten: Provide a decent
	// mechanism to edit the chip-o-matic settings like you can with
	// the foo_dumb preferences in foobar2000.
}

/*=======================================
 *
 * MIDI player
 *
 *=======================================*/

 OptionValue TimidityReverb
 {
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_STANDARD"
	2, "$ADVSNDMNU_GLOBAL"
	3, "$ADVSNDMNU_FREEVERB"
	4, "$ADVSNDMNU_GLOBAL_FREEVERB"
 }

  OptionMenu MidiPlayerOptions protected
 {
	Title "$SNDMNU_MIDIPLAYER"
	Submenu "$ADVSNDMNU_FLUIDSYNTH", "FluidsynthOptions", 0, 1
	Submenu "$ADVSNDMNU_TIMIDITY", "TimidityOptions", 0, 1
	Submenu "$ADVSNDMNU_GUSEMULATION", "GUSOptions", 0, 1
	Submenu "$ADVSNDMNU_WILDMIDI", "WildMidiOptions", 0, 1
	Submenu "$ADVSNDMNU_OPLSYNTHESIS", "OPLOptions", 0, 1
	Submenu "$ADVSNDMNU_ADLMIDI", "ADLOptions", 0, 1
	Submenu "$ADVSNDMNU_OPNMIDI", "OPNOptions", 0, 1
 }

 OptionMenu FluidsynthOptions protected
 {
	Title "$ADVSNDMNU_FLUIDSYNTH"
	LabeledSubMenu "$ADVSNDMNU_SELCONFIG",		"fluid_patchset", "FluidPatchsetMenu"
	Slider "$ADVSNDMNU_FLUIDGAIN",			"fluid_gain", 0, 10, 0.5, 1
	Option "$ADVSNDMNU_REVERB", 			"fluid_reverb", "OnOff"
	Option "$ADVSNDMNU_CHORUS", 			"fluid_chorus", "OnOff"
	Slider "$ADVSNDMNU_MIDIVOICES", 		"fluid_voices", 16, 4096, 16, 0
	// other CVARs need to be revieved for usefulness
 }

 OptionMenu TimidityOptions protected
 {
	Title "$ADVSNDMNU_TIMIDITY"
	LabeledSubMenu "$ADVSNDMNU_SELCONFIG",		"timidity_config", "TimidityConfigMenu"
	Option "$ADVSNDMNU_REVERB", 			"timidity_reverb", "TimidityReverb"
	Slider "$ADVSNDMNU_REVERB_LEVEL", 		"timidity_reverb_level", 9, 127, 1, 0
	Option "$ADVSNDMNU_CHORUS", 			"timidity_chorus", "OnOff"
	// other CVARs need to be revieved for usefulness
 }

 OptionMenu GUSOptions protected
 {
	Title "$ADVSNDMNU_GUSEMULATION"
	LabeledSubMenu "$ADVSNDMNU_SELCONFIG",		"midi_config", "GusConfigMenu"
	Slider "$ADVSNDMNU_MIDIVOICES",			"midi_voices", 16, 256, 4, 0
	Option "$ADVSNDMNU_DMXGUS", 			"midi_dmxgus", "OnOff"
	Option "$ADVSNDMNU_GUSMEMSIZE", 		"gus_memsize", "GusMemory"
 }

  OptionMenu WildMidiOptions protected
 {
	Title "$ADVSNDMNU_WILDMIDI"
	LabeledSubMenu "$ADVSNDMNU_SELCONFIG",		"wildmidi_config", "WildMidiConfigMenu"
	Option "$ADVSNDMNU_REVERB", 			"wildmidi_reverb", "OnOff"
	Option "$ADVSNDMNU_ADVRESAMPLING",		"wildmidi_enhanced_resampling", "OnOff"
 }

 OptionMenu OPLOptions protected
 {
 	Title "$ADVSNDMNU_OPLSYNTHESIS"
	Option "$ADVSNDMNU_OPLCORES", 			"opl_core", "OplCores"
	Slider "$ADVSNDMNU_OPLNUMCHIPS", 		"opl_numchips", 1, 8, 1, 0
	Option "$ADVSNDMNU_OPLFULLPAN",			"opl_fullpan", "OnOff"
 }

 OptionValue AdlVolumeModels
 {
	0, "$ADLVLMODEL_AUTO"
	1, "$ADLVLMODEL_GENERIC"
	2, "$ADLVLMODEL_NATIVE"
	3, "$ADLVLMODEL_DMX"
	4, "$ADLVLMODEL_APOGEE"
	5, "$ADLVLMODEL_WIN9X"
 }

 OptionValue ADLOplCores
 {
	0, "$OPTVAL_NUKEDOPL3"
	1, "$OPTVAL_NUKEDOPL3174"
	2, "$OPTVAL_DOSBOXOPL3"
 }

 OptionValue OpnCores
 {
	0, "$OPTVAL_MAMEOPN2"
	1, "$OPTVAL_NUKEDOPN2"
	2, "$OPTVAL_GENSOPN2"
 }

 OptionMenu ADLOptions protected
 {
	Title "$ADVSNDMNU_ADLMIDI"
	Option "$ADVSNDMNU_OPLCORES",		 "adl_emulator_id", "ADLOplCores"
	Option "$ADVSNDMNU_RUNPCMRATE",		 "adl_run_at_pcm_rate", "OnOff"
	Slider "$ADVSNDMNU_ADLNUMCHIPS", 	 "adl_chips_count", 1, 32, 1, 0
	Option "$ADVSNDMNU_OPLFULLPAN", 	 "adl_fullpan", "OnOff"
	Option "$ADVSNDMNU_VLMODEL",		 "adl_volume_model", "AdlVolumeModels"
	StaticText ""
	LabeledSubmenu "$ADVSNDMNU_OPLBANK", "adl_bank", "ADLBankMenu"
	StaticText ""
	Option "$ADVSNDMNU_ADLCUSTOMBANK", 	 "adl_use_custom_bank", "OnOff"
	LabeledSubmenu "$ADVSNDMNU_OPLBANKFILE", "adl_custom_bank", "ADLMIDICustomBanksMenu"
 }

 OptionMenu OPNOptions protected
 {
	Title "$ADVSNDMNU_OPNMIDI"
	Option "$ADVSNDMNU_OPNCORES",		 "opn_emulator_id", "OpnCores"
	Option "$ADVSNDMNU_RUNPCMRATE",		 "opn_run_at_pcm_rate", "OnOff"
	Slider "$ADVSNDMNU_OPNNUMCHIPS", 	 "opn_chips_count", 1, 32, 1, 0
	Option "$ADVSNDMNU_OPLFULLPAN", 	 "opn_fullpan", "OnOff"
	StaticText ""
	Option "$ADVSNDMNU_OPNCUSTOMBANK", 	 "opn_use_custom_bank", "OnOff"
	LabeledSubmenu "$ADVSNDMNU_OPNBANKFILE", "opn_custom_bank", "OPNMIDICustomBanksMenu"
 }

/*=======================================
 *
 * Change Renderer Menu
 *
 *=======================================*/

OptionValue "RenderMode"
{
	0, "$OPTVAL_SWDOOM"
	1, "$OPTVAL_SWDOOMTC"
	2, "$OPTVAL_SWPOLY"
	3, "$OPTVAL_SWPOLYTC"
	4,  "$OPTVAL_HWPOLY"
}

/*=======================================
 *
 * Video mode menu
 *
 *=======================================*/

OptionValue ForceRatios
{
	0.0, "$OPTVAL_OFF"
	3.0, "4:3"
	1.0, "16:9"
	5.0, "17:10"
	2.0, "16:10"
	4.0, "5:4"
	6.0, "21:9"
}
OptionValue Ratios
{
	0.0, "4:3"
	4.0, "5:4"
	1.0, "16:9"
	2.0, "16:10"
	3.0, "17:10"
	6.0, "21:9"
	 -1, "$OPTVAL_ALL"
}
OptionValue ScaleModes
{
	0, "$OPTVAL_SCALENEAREST"
	1, "$OPTVAL_SCALELINEAR"
	2, "320x200"
	3, "640x400"
	4, "1280x800"
	5, "$OPTVAL_CUSTOM"
}
OptionValue CropAspect
{
	0, "$OPTVAL_STRETCH"
	1, "$OPTVAL_LETTERBOX"
}

OptionMenu VideoModeMenu protected
{
	Title "$VIDMNU_TITLE"

	Option "$VIDMNU_RENDERMODE",		"vid_rendermode", "RenderMode"
	Option "$VIDMNU_FULLSCREEN",		"fullscreen", "YesNo"

	IfOption(Mac)
	{
		Option "$VIDMNU_HIDPI",			"vid_hidpi", "YesNo"
	}

	Option "$VIDMNU_FORCEASPECT",		"vid_aspect", "ForceRatios"
	Option "$VIDMNU_CROPASPECT",		"vid_cropaspect", "CropAspect"
	Option "$VIDMNU_SCALEMODE",			"vid_scalemode", "ScaleModes"
	Slider "$VIDMNU_SCALEFACTOR",		"vid_scalefactor", 0.25, 2.0, 0.25, 2

	StaticText ""
	StaticText "$VIDMNU_CUSTOMRES"
	TextField "$VIDMNU_CUSTOMX", menu_resolution_custom_width
	TextField "$VIDMNU_CUSTOMY", menu_resolution_custom_height
	Option "$VIDMNU_USELINEAR", "vid_scale_customlinear", "YesNo"
	StaticText ""
	Command "$VIDMNU_APPLYW", "menu_resolution_commit_changes 0"
	Command "$VIDMNU_APPLYFS", "menu_resolution_commit_changes 1"
	StaticText ""

	SubMenu "$VIDMNU_RESPRESET", CustomResolutionMenu
}

OptionMenu CustomResolutionMenu protected
{
	Title "$VIDMNU_RESPRESETTTL"

	StaticText "$VIDMNU_RESPRESETHEAD"
	StaticText ""
	StaticText "$VIDMNU_ASPECT43"
	Command "320x240", "menu_resolution_set_custom 320 240"
	Command "640x480", "menu_resolution_set_custom 640 480"
	Command "1024x768", "menu_resolution_set_custom 1024 768"
	Command "1280x960", "menu_resolution_set_custom 1280 960"
	Command "1600x1200", "menu_resolution_set_custom 1600 1200"
	StaticText ""
	StaticText "$VIDMNU_ASPECT54"
	Command "1280x1024", "menu_resolution_set_custom 1280 1024"
	StaticText ""
	StaticText "$VIDMNU_ASPECT169"
	Command "960x540", "menu_resolution_set_custom 960 540"
	Command "(720p HD)   1280x720", "menu_resolution_set_custom 1280 720"
	Command "1366x768", "menu_resolution_set_custom 1366 768"
	Command "(1080p HD) 1920x1080", "menu_resolution_set_custom 1920 1080"
	Command "(1440p HD)  2560x1440", "menu_resolution_set_custom 2560 1440"
	StaticText ""
	StaticText "$VIDMNU_ASPECT1610"
	Command "960x600", "menu_resolution_set_custom 960 600"
	Command "1280x800", "menu_resolution_set_custom 1280 800"
	Command "1440x900", "menu_resolution_set_custom 1440 900"
	Command "1680x1050", "menu_resolution_set_custom 1680 1050"
	Command "1920x1200", "menu_resolution_set_custom 1920 1200"
}

/*=======================================
 *
 * Network options menu
 *
 *=======================================*/

OptionMenu NetworkOptions protected
{
	Title "$NETMNU_TITLE"
	StaticText "$NETMNU_LOCALOPTIONS", 1
	Option "$NETMNU_MOVEPREDICTION",		"cl_noprediction", "OffOn"
	Option "$NETMNU_LINESPECIALPREDICTION",	"cl_predict_specials", "OnOff"
	Slider "$NETMNU_PREDICTIONLERPSCALE",	"cl_predict_lerpscale", 0.0, 0.5, 0.05, 2
	Slider "$NETMNU_LERPTHRESHOLD",			"cl_predict_lerpthreshold", 0.1, 16.0, 0.1
	StaticText " "
	StaticText "$NETMNU_HOSTOPTIONS", 1
	Option "$NETMNU_EXTRATICS",				"net_extratic", "ExtraTicMode"
	Option "$NETMNU_TICBALANCE",			"net_ticbalance", "OnOff"

}

OptionValue ExtraTicMode
{
	0, "$OPTVAL_NONE"
	1, "1"
	2, "$OPTVAL_ALLUNACKNOWLEDGED"
}

OptionValue "LookupOrder"
{
	0, "$OPTVAL_OBVERSEFIRST"
	1, "$OPTVAL_REVERSEFIRST"
}

OptionValue "SpriteclipModes"
{
	0, "$OPTVAL_NEVER"
	1, "$OPTVAL_SMART"
	2, "$OPTVAL_ALWAYS"
	3, "$OPTVAL_SMARTER"
}

OptionValue "EnhancedStealth"
{
	0, "$OPTVAL_NEVER"
	1, "$OPTVAL_INFRAREDONLY"
	2, "$OPTVAL_INFRAREDANDTORCH"
	3, "$OPTVAL_ANYFIXEDCOLORMAP"
}

OptionValue "FilterModes"
{
	0, "$OPTVAL_NONE"
	1, "$OPTVAL_NONENEARESTMIPMAP"
	5, "$OPTVAL_NONELINEARMIPMAP"
	6, "$OPTVAL_NONETRILINEAR"
	2, "$OPTVAL_LINEAR"
	3, "$OPTVAL_BILINEAR"
	4, "$OPTVAL_TRILINEAR"
}

OptionValue "HWGammaModes"
{
	0, "$OPTVAL_ON"
	1, "$OPTVAL_OFF"
	2, "$OPTVAL_FULLSCREENONLY"
}

OptionValue "TonemapModes"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_UNCHARTED2"
	2, "$OPTVAL_HEJLDAWSON"
	3, "$OPTVAL_REINHARD"
	4, "$OPTVAL_LINEAR"
	5, "$OPTVAL_PALETTE"
}

OptionValue "SSAOModes"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_LOW"
	2, "$OPTVAL_MEDIUM"
	3, "$OPTVAL_HIGH"
}

OptionValue "FXAAQuality"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_LOW"
	2, "$OPTVAL_MEDIUM"
	3, "$OPTVAL_HIGH"
	4, "$OPTVAL_EXTREME"
}

OptionValue "Anisotropy"
{
	1, "$OPTVAL_OFF"
	2, "$OPTVAL_2X"
	4, "$OPTVAL_4X"
	8, "$OPTVAL_8X"
	16, "$OPTVAL_16X"
}

OptionValue "Multisample"
{
	1, "$OPTVAL_OFF"
	2, "$OPTVAL_2X"
	4, "$OPTVAL_4X"
	8, "$OPTVAL_8X"
	16, "$OPTVAL_16X"
	32, "$OPTVAL_32X"
}

OptionValue "Colormaps"
{
	0, "$OPTVAL_USEASPALETTE"
	1, "$OPTVAL_BLEND"
}

OptionValue "LightingModes"
{
	0, "$OPTVAL_STANDARD"
	1, "$OPTVAL_BRIGHT"
	2, "$OPTVAL_DOOM"
	3, "$OPTVAL_DARK"
	4, "$OPTVAL_LEGACY"
	8, "$OPTVAL_SOFTWARE"
}

OptionValue "Precision"
{
	0, "$OPTVAL_SPEED"
	1, "$OPTVAL_QUALITY"
}

OptionValue "DitherModes"
{
	0, "$OPTVAL_OFF"
	-1, "$OPTVAL_ON"
	6, "6 BPC"
	8, "8 BPC"
	10, "10 BPC"
	12, "12 BPC"
}

OptionValue "Hz"
{
	0, "$OPTVAL_OPTIMAL"
	60, "$OPTVAL_60"
	70, "$OPTVAL_70"
	72, "$OPTVAL_72"
	75, "$OPTVAL_75"
	85, "$OPTVAL_85"
	100, "$OPTVAL_100"
}

OptionValue "BillboardModes"
{
	0, "$OPTVAL_YAXIS"
	1, "$OPTVAL_XYAXIS"
}


OptionValue "Particles"
{
	0, "$OPTVAL_SQUARE"
	1, "$OPTVAL_ROUND"
	2, "$OPTVAL_SMOOTH"
}

OptionValue "HqResizeModes"
{
   0, "$OPTVAL_OFF"
   1, "$OPTVAL_SCALENX"
   2, "$OPTVAL_HQNX"
   3, "$OPTVAL_HQNXMMX"
   4, "$OPTVAL_NXBRZ"
   5, "$OPTVAL_OLD_NXBRZ"
   6, "$OPTVAL_NORMALNX"
}

OptionValue "HqResizeMultipliers"
{
   1, "$OPTVAL_OFF"
   2, "2x"
   3, "3x"
   4, "4x"
   5, "5x"
   6, "6x"
}

OptionValue "HqResizeModesNoMMX"
{
   0, "$OPTVAL_OFF"
   1, "$OPTVAL_SCALENX"
   2, "$OPTVAL_HQNX"
   4, "$OPTVAL_NXBRZ"
   5, "$OPTVAL_OLD_NXBRZ"
   6, "$OPTVAL_NORMALNX"
}

OptionValue "FogMode"
{
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_STANDARD"
	2, "$OPTVAL_RADIAL"
}

OptionValue "FuzzStyle"
{
	0, "$OPTVAL_SHADOW"
	1, "$OPTVAL_PIXELFUZZ"
	2, "$OPTVAL_SMOOTHFUZZ"
	3, "$OPTVAL_SWIRLYFUZZ"
	4, "$OPTVAL_TRANSLUCENTFUZZ"
	6, "$OPTVAL_NOISE"
	7, "$OPTVAL_SMOOTHNOISE"
	8, "$OPTVAL_SOFTWARE"
	//5, "$OPTVAL_JAGGEDFUZZ" I can't see any difference between this and 4 so it's disabled for now.
}

OptionValue VRMode
{
	0, "$OPTVAL_NORMAL"
	1, "$OPTVAL_GREENMAGENTA"
	2, "$OPTVAL_REDCYAN"
	9, "$OPTVAL_AMBERBLUE"
	3, "$OPTVAL_SBSFULL"
	4, "$OPTVAL_SBSNARROW"
	11, "$OPTVAL_TOPBOTTOM"
	12, "$OPTVAL_ROWINTERLEAVED"
	13, "$OPTVAL_COLUMNINTERLEAVED"
	14, "$OPTVAL_CHECKERBOARD"
	5, "$OPTVAL_LEFTEYE"
	6, "$OPTVAL_RIGHTEYE"
	7, "$OPTVAL_QUADBUFFERED"
}

OptionValue ShadowMapQuality
{
	128, "128"
	256, "256"
	512, "512"
	1024, "1024"
}

OptionValue ShadowMapFilter
{
	0, "$OPTVAL_NEAREST"
	1, "$OPTVAL_PCF_LOW"
	2, "$OPTVAL_PCF_MEDIUM"
	3, "$OPTVAL_PCF_HIGH"
}


OptionMenu "GLTextureGLOptions" protected
{
	Title "$GLTEXMNU_TITLE"
	Option "$GLTEXMNU_TEXENABLED",		gl_texture,						"YesNo"
	Option "$GLTEXMNU_TEXFILTER",		gl_texture_filter,				"FilterModes"
	Option "$GLTEXMNU_ANISOTROPIC",		gl_texture_filter_anisotropic,	"Anisotropy"
	Option "$GLTEXMNU_ENABLEHIRES",		gl_texture_usehires,			"YesNo"

	ifOption(MMX)
	{
		Option "$GLTEXMNU_HQRESIZE",		gl_texture_hqresizemode,		"HqResizeModes"
	}
	else
	{
		Option "$GLTEXMNU_HQRESIZE",		gl_texture_hqresizemode,		"HqResizeModesNoMMX"
	}
	Option "$GLTEXMNU_HQRESIZEMULT",	gl_texture_hqresizemult,		"HqResizeMultipliers"
	StaticText "!HQRESIZE_WARNING!"

	Option "$GLTEXMNU_RESIZETEX",		gl_texture_hqresize_textures,	"OnOff"
	Option "$GLTEXMNU_RESIZESPR",		gl_texture_hqresize_sprites,	"OnOff"
	Option "$GLTEXMNU_RESIZEFNT",		gl_texture_hqresize_fonts,		"OnOff"
	Option "$GLTEXMNU_PRECACHETEX",		gl_precache,					"YesNo"
	Option "$GLTEXMNU_TRIMSPREDGE",		gl_trimsprites,					"OnOff"
	Option "$GLTEXMNU_SORTDRAWLIST", 	gl_sort_textures,				"YesNo"
	Class "GLTextureGLOptions"
}

OptionMenu "GLLightOptions" protected
{
	Title "$GLLIGHTMNU_TITLE"
	Option "$TCMNU_DYNLIGHTS",					"r_dynlights", "OnOff"
	Option "$GLLIGHTMNU_LIGHTSENABLED",			gl_lights,				"OnOff"
	Option "$GLLIGHTMNU_LIGHTDEFS",				gl_attachedlights,		"YesNo"
	Option "$GLLIGHTMNU_LIGHTSPRITES",			gl_light_sprites,		"YesNo"
	Option "$GLLIGHTMNU_LIGHTPARTICLES",		gl_light_particles,		"YesNo"
	Option "$GLLIGHTMNU_LIGHTSHADOWMAP",		gl_light_shadowmap,		"YesNo"
	Option "$GLLIGHTMNU_LIGHTSHADOWMAPQUALITY", gl_shadowmap_quality,	"ShadowMapQuality"
	Option "$GLLIGHTMNU_LIGHTSHADOWMAPFILTER", 	gl_shadowmap_filter,	"ShadowMapFilter"
}

OptionMenu "OpenGLOptions" protected
{
	Title "$GLMNU_TITLE"
	Submenu "$GLMNU_TEXOPT", 			"GLTextureGLOptions"
	StaticText " "
	Option "$GLPREFMNU_SECLIGHTMODE",			gl_lightmode,					"LightingModes"
	Option "$GLPREFMNU_SWLMBANDED",				gl_bandedswlight,				"OnOff"
	Option "$GLPREFMNU_FOGMODE",				gl_fogmode,						"FogMode"
	Option "$GLPREFMNU_FOGFORCEFULLBRIGHT",		gl_brightfog,					"YesNo"
	Slider "$GLPREFMNU_WPNLIGHTSTR",			gl_weaponlight,					0,32, 2
	Option "$GLPREFMNU_ENVIRONMENTMAPMIRROR",	gl_mirror_envmap,				"OnOff"
	Option "$GLPREFMNU_ENV",					gl_enhanced_nightvision,		"OnOff"
	Option "$GLPREFMNU_ENVSTEALTH",				gl_enhanced_nv_stealth,			"EnhancedStealth"
	Option "$GLPREFMNU_SPRBRIGHTFOG",			gl_spritebrightfog,				"OnOff"
	Option "$GLPREFMNU_SPRCLIP",				gl_spriteclip,					"SpriteclipModes"
	Option "$GLPREFMNU_SPRBLEND",				gl_sprite_blend,				"OnOff"
	Option "$GLPREFMNU_FUZZSTYLE",				gl_fuzztype,					"FuzzStyle"
	Option "$GLPREFMNU_SPRBILLBOARD",			gl_billboard_mode,				"BillboardModes"
	Option "$GLPREFMNU_SPRBILLFACECAMERA",		gl_billboard_faces_camera,		"OnOff"
	Option "$GLPREFMNU_PARTICLESTYLE",			gl_particles_style,				"Particles"
	Option "$GLPREFMNU_RENDERQUALITY",			gl_render_precise,				"Precision"
	StaticText " "
	Slider "$GLPREFMNU_MENUBLUR",				gl_menu_blur, 0, 5.0, 0.5, 2
	StaticText " "
	Option "$GLPREFMNU_VRMODE",					vr_mode, 						"VRMode"
	IfOption(Windows)
	{
		Option "$GLPREFMNU_VRQUADSTEREO",			vr_enable_quadbuffered,			"OnOff"
	}
	Slider "$GLPREFMNU_VRIPD",					vr_ipd,							0.041, 0.073, 0.001, 3
	Slider "$GLPREFMNU_VRSCREENDIST",			vr_screendist,					0.2, 10.0, 0.1, 1
	StaticText " "
	Option "$GLPREFMNU_MULTISAMPLE", 			gl_multisample,					"Multisample"
	Option "$GLPREFMNU_TONEMAP", 				gl_tonemap,						"TonemapModes"
	Option "$GLPREFMNU_BLOOM",		 			gl_bloom,						"OnOff"
	Option "$GLPREFMNU_LENS",		 			gl_lens,						"OnOff"
	Option "$GLPREFMNU_SSAO",		 			gl_ssao,						"SSAOModes"
	Slider "$GLPREFMNU_SSAO_PORTALS",			gl_ssao_portals,				0.0, 4.0, 1.0, 0
	Option "$GLPREFMNU_FXAA",		 			gl_fxaa,						"FXAAQuality"
	Option "$GLPREFMNU_DITHER",		 			gl_dither_bpc,					"DitherModes"
	StaticText " "
	Slider "$GLPREFMNU_PALTONEMAPPOWER",		gl_paltonemap_powtable,			0.2, 3.0, 0.1, 1
	Option "$GLPREFMNU_PALTONEMAPORDER",		gl_paltonemap_reverselookup,	"LookupOrder"
}

OptionMenu "ReverbEdit" protected
{
	Class "ReverbEdit"
	Title "$OPTMNU_REVERB"
	StaticTextSwitchable 	"", "", "EvironmentName", 1
	StaticTextSwitchable 	"", "", "EvironmentID"
	StaticText " "
	Submenu "Select Environment", "ReverbSelect"
	Option "Test Environment", "eaxedit_test", OnOff
	StaticText " "
	Submenu "New Environment", "ReverbNew"
	Submenu "Save Environments", "ReverbSave"
	Submenu "Edit Environment", "ReverbSettings"
}

OptionMenu "ReverbSelect" protected
{
	Class "ReverbSelect"
	Title "Select Environment"
	// filled in by code
}

OptionMenu "ReverbSettings" protected
{
	Title "Edit Reverb Environment"
  	SafeCommand "Revert settings", "revertenvironment"
	StaticText " "
	SliderReverbEditOption "Environment Size", 1, 100, 0.01, 3, 1
    SliderReverbEditOption "Environment Diffusion", 0, 1, 0.01, 3, 2
    SliderReverbEditOption "Room", -10000, 0, 1, 0, 3
    SliderReverbEditOption "Room HF", -10000, 0, 1, 0, 4
    SliderReverbEditOption "Room LF", -10000, 0, 1, 0, 5
    SliderReverbEditOption "Decay Time", 1, 200, 0.01, 3, 6
    SliderReverbEditOption "Decay HF Ratio", 1, 20, 0.01, 3, 7
    SliderReverbEditOption "Decay LF Ratio", 1, 20, 0.01, 3, 8
    SliderReverbEditOption "Reflections", -10000, 1000, 1, 0, 9
    SliderReverbEditOption "Reflections Delay", 0, 0.3, 1, 3, 10
    SliderReverbEditOption "Reflections Pan X", -2000, 2000, 1, 3, 11
    SliderReverbEditOption "Reflections Pan Y", -2000, 2000, 1, 3, 12
    SliderReverbEditOption "Reflections Pan Z", -2000, 2000, 1, 3, 13
    SliderReverbEditOption "Reverb", -10000, 2000, 1, 0, 14
    SliderReverbEditOption "Reverb Delay", 0, 0.1, 0.01, 3, 15
    SliderReverbEditOption "Reverb Pan X", -2000, 2000, 1, 3, 16
    SliderReverbEditOption "Reverb Pan Y", -2000, 2000, 1, 3, 17
    SliderReverbEditOption "Reverb Pan Z", -2000, 2000, 1, 3, 18
    SliderReverbEditOption "Echo Time", 0.075, 0.25, 0.005, 3, 19
    SliderReverbEditOption "Echo Depth", 0, 1, 0.01, 3, 20
    SliderReverbEditOption "Modulation Time", 0.04, 4, 0.01, 3, 21
    SliderReverbEditOption "Modulation Depth",0, 1, 0.01, 3, 22
    SliderReverbEditOption "Air Absorption HF", -100, 0, 0.01, 3, 23
    SliderReverbEditOption "HF Reference", 10000, 200000, 1, 3, 24
    SliderReverbEditOption "LF Reference",20, 10000, 0.1, 3, 25
    SliderReverbEditOption "Room Rolloff Factor",0, 10, 0.01, 3, 26
    SliderReverbEditOption "Diffusion",0, 100, 0.01, 3, 27
    SliderReverbEditOption "Density",0, 100, 0.01, 3, 28
	StaticText " "
    ReverbOption "Reflections Scale", 29, OnOff
    ReverbOption "Reflections Delay Scale", 30, OnOff
    ReverbOption "Decay Time Scale", 31, OnOff
    ReverbOption "Decay HF Limit", 32, OnOff
    ReverbOption "Reverb Scale", 33, OnOff
    ReverbOption "Reverb Delay Scale", 34, OnOff
    ReverbOption "Echo Time Scale", 35, OnOff
    ReverbOption "Modulation Time Scale", 36, OnOff
}

OptionMenu "ReverbNew" protected
{
	Title "New Reverb Environment"
	ReverbSelect "Based on", "ReverbSelect"
	TextField "Name", "reverbedit_name"
	NumberField "ID #1", "reverbedit_id1", 0, 255
	NumberField "ID #2", "reverbedit_id2", 0, 255
	Command "Create", "createenvironment", 0, 1
}

OptionMenu "ReverbSave" protected
{
	Class "ReverbSave"
	Title "Save Reverb Environments"
	Command "Save...", "savereverbs"
	TextField "File name", "reverbsavename"
	StaticText ""
	StaticText "Environments to save"
	// Rest is filled in by code.
}
