//-------------------------------------------------------------------------------------------
//
// 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, Standalone, 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, Standalone, Heretic, Hexen, Strife) {
		NetgameMessage "$NEWGAME"
	}
	IfGame(Chex) {
		NetgameMessage "$CNEWGAME"
	}
	IfGame(Doom, Chex) {
		Position 48, 53
		StaticPatch 54, 28, "M_EPISOD"
	}
	IfGame(Strife) {
		Position 48, 53
		StaticText 54, 28, "$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, Standalone, 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"
	StaticText "Controls"
	Submenu "$OPTMNU_CONTROLS",			"CustomizeControls"
	Submenu "$OPTMNU_MOUSE",			"MouseOptions"
	Submenu "$OPTMNU_JOYSTICK",			"JoystickOptions"
	StaticText ""
	StaticText "Game"
	Submenu "$OPTMNU_PLAYER",			"NewPlayerMenu"
	Submenu "$OPTMNU_HUD",				"HUDOptions"
	Submenu "$OPTMNU_AUTOMAP",			"AutomapOptions"
	StaticText ""
	StaticText "System"
	Submenu "$OPTMNU_SOUND",			"SoundOptions"
	Submenu "$OPTMNU_DISPLAY",			"VideoOptions"
	StaticText ""
	StaticText "Compatibility/Misc"
	Submenu "$OPTMNU_GAMEPLAY",			"GameplayOptions"
	IfGame(Doom, Chex, Heretic, Hexen, Strife) {
		Submenu "$OPTMNU_COMPATIBILITY",	"CompatibilityOptions"
	}
	Submenu "$OPTMNU_MISCELLANEOUS",	"MiscOptions"
	StaticText ""
	StaticText "Other"
	Submenu "$OPTMNU_NETWORK",			"NetworkOptions"
	Command "$OPTMNU_CONSOLE",			"menuconsole"
}

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

OptionValue "Gender" {
	0, "$OPTVAL_MALE"
	1, "$OPTVAL_FEMALE"
}

OptionValue "PlayerTeam" {
	// Filled in programmatically
}

OptionValue "PlayerColors" {
	// Filled in programmatically
}

OptionValue "PlayerClass" {
	// Filled in programmatically
}

OptionValue "PlayerSkin" {
	// Filled in programmatically
}

OptionMenu "NewPlayerMenu" protected {
	Title "$MNU_PLAYERSETUP"
	PlayerNameField "$PLYRMNU_NAME"
	PlayerTeamItem "$PLYRMNU_TEAM", "PlayerTeam"
	PlayerColorItem "$PLYRMNU_PLAYERCOLOR", "PlayerColors"
	PlayerColorSlider "$PLYRMNU_RED", 0
	PlayerColorSlider "$PLYRMNU_GREEN", 1
	PlayerColorSlider "$PLYRMNU_BLUE", 2
	PlayerClassItem "$PLYRMNU_PLAYERCLASS", "PlayerClass"
	PlayerSkinItem "$PLYRMNU_PLAYERSKIN", "PlayerSkin"
	PlayerGenderItem "$PLYRMNU_PLAYERGENDER", "Gender"
	AutoaimSlider "$PLYRMNU_AUTOAIM"
	PlayerSwitchOnPickupItem "$PLYRMNU_SWITCHONPICKUP", "OffOn"
	Option "$PLYRMNU_ALWAYSRUN", cl_run, "OnOff"
	Class "NewPlayerMenu"
}

// The old player menu is kept for mods that redefine it.
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"

	Submenu    "$CNTRLMNU_ACTION"      , "ActionControlsMenu"
	Submenu    "$CNTRLMNU_WEAPONS"     , "WeaponsControlMenu"
	Submenu    "$CNTRLMNU_INVENTORY"   , "InventoryControlsMenu"
	Submenu    "$MAPCNTRLMNU_CONTROLS" , "MapControlsMenu"
	Submenu    "$CNTRLMNU_OTHER"       , "OtherControlsMenu"
	Submenu    "$CNTRLMNU_POPUPS"      , "StrifeControlsMenu"
	Submenu    "$CNTRLMNU_MULTIPLAYER" , "ChatControlsMenu"
	StaticText ""
	SafeCommand "$OPTMNU_DEFAULTS",		"resetb2defaults"
}

OptionMenu "ActionControlsMenu" protected {
	Title "$CNTRLMNU_ACTION_TITLE"
	ScrollTop 2
	StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	Control    "$CNTRLMNU_ATTACK"           , "+attack"
	Control    "$CNTRLMNU_ALTATTACK"        , "+altattack"
	Control    "$CNTRLMNU_RELOAD"           , "+reload"
	Control    "$CNTRLMNU_ZOOM"             , "+zoom"

	StaticText ""
	Control    "$CNTRLMNU_USE"              , "+use"

	StaticText ""
	Control    "$CNTRLMNU_FORWARD"          , "+forward"
	Control    "$CNTRLMNU_BACK"             , "+back"
	Control    "$CNTRLMNU_MOVELEFT"         , "+moveleft"
	Control    "$CNTRLMNU_MOVERIGHT"        , "+moveright"

	StaticText ""
	Control    "$CNTRLMNU_TURNLEFT"         , "+left"
	Control    "$CNTRLMNU_TURNRIGHT"        , "+right"
	Control    "$CNTRLMNU_TURN180"          , "turn180"

	StaticText ""
	Control    "$CNTRLMNU_JUMP"             , "+jump"
	Control    "$CNTRLMNU_CROUCH"           , "+crouch"
	Control    "$CNTRLMNU_TOGGLECROUCH"     , "crouch"

	StaticText ""
	Control    "$CNTRLMNU_MOVEUP"           , "+moveup"
	Control    "$CNTRLMNU_MOVEDOWN"         , "+movedown"

	StaticText ""
	Control    "$CNTRLMNU_MOUSELOOK"        , "+mlook"
	Control    "$CNTRLMNU_KEYBOARDLOOK"     , "+klook"
	Control    "$CNTRLMNU_LOOKUP"           , "+lookup"
	Control    "$CNTRLMNU_LOOKDOWN"         , "+lookdown"
	Control    "$CNTRLMNU_CENTERVIEW"       , "centerview"

	StaticText ""
	Control    "$CNTRLMNU_RUN"              , "+speed"
	Control    "$CNTRLMNU_TOGGLERUN"        , "toggle cl_run"
	Control    "$CNTRLMNU_STRAFE"           , "+strafe"
}

OptionMenu "ChatControlsMenu" protected {
	Title "$CNTRLMNU_MULTIPLAYER"
	ScrollTop 2
	StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	Control    "$CNTRLMNU_SCOREBOARD"       , "+showscores"
	Control    "$CNTRLMNU_TOGGLESCOREBOARD" , "togglescoreboard"

	StaticText ""
	Control    "$CNTRLMNU_SAY"     , "messagemode"
	Control    "$CNTRLMNU_TEAMSAY" , "messagemode2"
	StaticText ""
	Control    "$CNTRLMNU_COOPSPY"         , "spynext"
}

OptionMenu "WeaponsControlMenu" protected {
	Title "$CNTRLMNU_WEAPONS_TITLE"
	ScrollTop 2
	StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	Control    "$CNTRLMNU_NEXTWEAPON"     , "weapnext"
	Control    "$CNTRLMNU_PREVIOUSWEAPON" , "weapprev"

	StaticText ""
	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 ""
	Control    "$CNTRLMNU_USER1"            , "+user1"
	Control    "$CNTRLMNU_USER2"            , "+user2"
	Control    "$CNTRLMNU_USER3"            , "+user3"
	Control    "$CNTRLMNU_USER4"            , "+user4"
}

OptionMenu "InventoryControlsMenu" protected {
	Title "$CNTRLMNU_INVENTORY_TITLE"
	ScrollTop 2
	StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	Control    "$CNTRLMNU_USEITEM"      , "invuse"
	Control    "$CNTRLMNU_USEALLITEMS"  , "invuseall"

	StaticText ""
	Control    "$CNTRLMNU_NEXTITEM"     , "invnext"
	Control    "$CNTRLMNU_PREVIOUSITEM" , "invprev"

	StaticText ""
	Control    "$CNTRLMNU_DROPITEM"     , "invdrop"
	Control    "$CNTRLMNU_QUERYITEM"    , "invquery"

	StaticText ""
	Control    "$CNTRLMNU_DROPWEAPON"   , "weapdrop"
}

OptionMenu "OtherControlsMenu" protected {
	Title "$CNTRLMNU_OTHER_TITLE"
	ScrollTop 2
	StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	Control    "$CNTRLMNU_CHASECAM"        , "chase"

	StaticText ""
	Control    "$CNTRLMNU_SCREENSHOT"      , "screenshot"
	Control    "$CNTRLMNU_CONSOLE"         , "toggleconsole"
	Control    "$CNTRLMNU_PAUSE"           , "pause"

	StaticText ""
	Control    "$CNTRLMNU_TOGGLE_MESSAGES" , "togglemessages"

	StaticText ""
	Control    "$CNTRLMNU_OPEN_MAIN"       , "menu_main"
	Control    "$CNTRLMNU_OPEN_HELP"       , "menu_help"
	Control    "$CNTRLMNU_OPEN_SAVE"       , "menu_save"
	Control    "$CNTRLMNU_OPEN_LOAD"       , "menu_load"
	Control    "$CNTRLMNU_OPEN_OPTIONS"    , "menu_options"
	Control    "$CNTRLMNU_OPEN_DISPLAY"    , "menu_display"
	Control    "$CNTRLMNU_EXIT_TO_MAIN"    , "menu_endgame"
	Control    "$CNTRLMNU_MENU_QUIT"       , "menu_quit"

	StaticText ""
	Control    "$CNTRLMNU_QUICKSAVE"       , "quicksave"
	Control    "$CNTRLMNU_QUICKLOAD"       , "quickload"
}

OptionMenu "StrifeControlsMenu" protected {
	Title "$CNTRLMNU_POPUPS_TITLE"
	ScrollTop 2
	StaticTextSwitchable "$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	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"
}

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"
	StaticText ""
	Slider "$MOUSEMNU_SENSITIVITY_X",	"mouse_sensitivity_x", -10.0, 10.0, 0.1
	Slider "$MOUSEMNU_SENSITIVITY_Y",	"mouse_sensitivity_y", -10.0, 10.0, 0.1
	Option "$MOUSEMNU_SMOOTHMOUSE",		"m_filter", "YesNo"
	StaticText ""
	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_LOOKSPRING",		"lookspring", "OnOff"
	Option "$MOUSEMNU_LOOKSTRAFE",		"lookstrafe", "OnOff"
}


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

OptionMenu "JoystickOptionsDefaults" protected {
	Title "$JOYMNU_OPTIONS"
	Option "$JOYMNU_ENABLE", "joy_enabled", "YesNo"
	Option "$JOYMNU_BACKGROUND", "joy_background", "YesNo"
	Option "$JOYMNU_HAPTIC", "joy_haptic", "YesNo"
	Option "$JOYMNU_NOMENU", "m_blockcontrollers", "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 RocketTrailTypes {
	0.0, "$OPTVAL_OFF"
	1.0, "$OPTVAL_PARTICLES"
	2.0, "$OPTVAL_SPRITES"
	3.0, "$OPTVAL_SPRITESPARTICLES"
}

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

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 Contrast {
	0.0, "$OPTVAL_OFF"
	1.0, "$OPTVAL_ON"
	2.0, "$OPTVAL_SMOOTH"
}

OptionValue "SpriteShadowModes" {
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_DEFAULT"
	2, "$OPTVAL_SPRSHADALWAYS"
}

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 ScaleModes {
	0, "$OPTVAL_SCALENEAREST"
	1, "$OPTVAL_SCALELINEAR"
	2, "320x200"
	3, "320x240"
	4, "640x480"
	5, "$OPTVAL_CUSTOM"
	6, "$OPTVAL_LOWEST"
}

OptionValue CropAspect {
	0, "$OPTVAL_STRETCH"
	1, "$OPTVAL_LETTERBOX"
}

OptionValue VsyncMode {
	-1, "Adaptive"
	0, "Disabled"
	1, "Enabled"
}

OptionMenu "VideoOptions" protected {
	Title "$DSPLYMNU_TITLE"

	Submenu "$DSPLYMNU_ADOPT", 			"ExtraVideoOptions"
	Submenu "$RENDPREF_MNUTEXOPT",		"VXTextureOptions"
	Submenu "$RENDPREF_MNUSHADERS",		"VXShaderOptions"

	StaticText ""
	Option "$VIDMNU_FULLSCREEN",		"fullscreen", "YesNo"
	Option "$DSPLYMNU_VSYNC",			"vid_vsync", "VsyncMode"
	Option "$DSPLYMNU_VIDFPS",			"vid_fps", "OnOff"

	StaticText ""
	Slider "$DSPLYMNU_GAMMA",			"vid_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
	Slider "$DSPLYMNU_FOV",				"fov",				75.0, 120.0, 0.1, 1
	Slider "$DSPLYMNU_SCREENSIZE",		"screenblocks", 	3.0, 12.0, 1.0, 0

	StaticText ""
	Option "$DSPLYMNU_WIPETYPE",		"wipetype", "Wipes"
	Option "$DSPLYMNU_DRAWFUZZ",		"r_fuzztype", "OnOff"
	Option "$DSPLYMNU_DEATHCAM",		"r_deathcamera", "OnOff"
	Option "$DSPLYMNU_FAKECONTRAST",	"r_fakecontrast", "Contrast"
	Option "$DSPLYMNU_SPRITESHADOW",	"r_actorspriteshadow", "SpriteShadowModes"
	Option "$DSPLYMNU_ROCKETTRAILS",	"sv_rockettrails", "RocketTrailTypes"
	Option "$DSPLYMNU_BLOODTYPE",		"sv_bloodtype", "BloodTypes"
	Option "$DSPLYMNU_PUFFTYPE",		"sv_pufftype", "PuffTypes"
	Slider "$DSPLYMNU_MAXPARTICLES",	"sv_maxparticles", 0, 1024, 64, 0
	Slider "$DSPLYMNU_MAXDECALS",		"cl_maxdecals", 0, 1000, 50, 0
	Slider "$DSPLYMNU_QUAKEINTENSITY",	"r_quakeintensity", 0.0, 1.0, 0.05, 2
}


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

OptionValue CrosshairHealthTypes {
	0.0, "$TXT_NO"
	1.0, "$OPTVAL_YES_STANDARD"
	2.0, "$OPTVAL_YES_ENHANCED"
}

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"
	Submenu "$HUDMNU_FLASH", 				"FlashOptions"
	Submenu "$DSPLYMNU_SCOREBOARD", 		"ScoreboardOptions"
	StaticText ""
	Option "$HUDMNU_CROSSHAIRON",			"crosshairon", "OnOff"
	Option "$HUDMNU_CROSSHAIR",				"crosshair", "Crosshairs"
	Option "$HUDMNU_FORCECROSSHAIR",		"crosshairforce", "OnOff"
	Option "$HUDMNU_GROWCROSSHAIR",			"crosshairgrow", "OnOff"
	Option "$HUDMNU_CROSSHAIRHEALTH",		"crosshairhealth", "CrosshairHealthTypes"
	Slider "$HUDMNU_CROSSHAIRSCALE",		"crosshairscale", 0.0, 2.0, 0.05, 2
	ColorPicker "$HUDMNU_CROSSHAIRCOLOR", 	"crosshaircolor"
	StaticText ""
	Option "$HUDMNU_NAMETAGS",				"displaynametags", "DisplayTagsTypes"
	Option "$HUDMNU_NAMETAGCOLOR",			"nametagcolor", "TextColors", "displaynametags"
	StaticText ""
	Slider "$DSPLYMNU_MENUDIM",				"dimamount", 0, 1.0, 0.05, 2
	ColorPicker "$DSPLYMNU_DIMCOLOR",		"dimcolor"
	StaticText ""
	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
	Slider "$DSPLYMNU_BOBFIRE",				"wbobfire", 0, 1.0, 0.1

}

OptionMenu "FlashOptions" protected {
	Title "$HUDMNU_FLASH"
	Option "$HUDMNU_HEXENFLASHES",			"pf_hexenweaps", "ZDoomHexen"
	Option "$HUDMNU_POISONFLASHES",			"pf_poison", "ZDoomHexen"
	Option "$HUDMNU_ICEFLASHES",			"pf_ice", "ZDoomHexen"
	Option "$HUDMNU_HAZARDFLASHES",			"pf_hazard", "ZDoomStrife"
	StaticText ""
	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
}

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", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
	ScaleSlider "$SCALEMNU_HUD", 				"hud_scale", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
	ScaleSlider "$SCALEMNU_ALTHUD",				"hud_althudscale", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
}
//-------------------------------------------------------------------------------------------
//
// Alternative HUD
//
//-------------------------------------------------------------------------------------------

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_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"
}

OptionValue AlwaysTally {
	0,	"$OPTVAL_MODDEFINED"
	1,	"$OPTVAL_NOTHUBS"
	2,	"$OPTVAL_WITHHUBS"
}

OptionMenu "MiscOptions" protected {
	Title "$MISCMNU_TITLE"
	StaticText "Files (Restart required)"
	Option "$MISCMNU_DEHLOAD",					"dehload", "dehopt"
	Option "$MISCMNU_AUTOLOAD",					"disableautoload", "OnOff"
	Option "$MISCMNU_SCUFFEDTAG",				"disablescuffedtag", "OnOff"
	StaticText ""
	StaticText "Saves"
	Option "$MISCMNU_ENABLEAUTOSAVES",			"disableautosave", "Autosave"
	Option "$MISCMNU_SAVELOADCONFIRMATION",		"saveloadconfirmation", "OnOff"
	Slider "$MISCMNU_AUTOSAVECOUNT",			"autosavecount", 1, 20, 1, 0
	StaticText ""
	StaticText "Other"
	Option "$MISCMNU_ENABLESCRIPTSCREENSHOTS",	"enablescriptscreenshot", "OnOff"
	Option "$MISCMNU_INTERSCROLL",				"nointerscrollabort", "OffOn"
	Option "$MISCMNU_NOCHEATS",					"nocheats", "OnOff"
	Option "$MISCMNU_ALLCHEATS",				"allcheats", "OnOff"

}

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

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 MapTriggers {
	0, "$OPTVAL_OFF"
	1, "$OPTVAL_NODOORS"
	2, "$OPTVAL_ON"
}

OptionString MapMarkFont {
	"AMMNUMx", "$OPTVAL_DEFAULT"
	"SmallFont", "$OPTVAL_SMALL"
	"BigFont", "$OPTVAL_LARGE"
	"ConsoleFont", "$OPTVAL_CONSOLE"
}

OptionMenu AutomapOptions protected {
	Title "$AUTOMAPMNU_TITLE"
	Submenu "$AUTOMAPMNU_SETCUSTOMCOLORS",		"MapColorMenu"
	Submenu "$AUTOMAPMNU_CONTROLS",				"MapControlsMenu"

	StaticText ""
	Option "$AUTOMAPMNU_ROTATE",				"am_rotate", "RotateTypes"
	Option "$AUTOMAPMNU_OVERLAY",				"am_overlay", "OverlayTypes"
	Option "$AUTOMAPMNU_FOLLOW",				"am_followplayer", "OnOff"

	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_SHOWMAPLABEL",			"am_showmaplabel", "MaplabelTypes"

	StaticText ""
	Option "$AUTOMAPMNU_SHOWKEYS",				"am_showkeys", "OnOff"
	Option "$AUTOMAPMNU_SHOWKEYS_ALWAYS",		"am_showkeys_always", "OnOff"

	StaticText ""
	Option "$AUTOMAPMNU_MAPSECRETS",			"am_map_secrets", "SecretTypes"
	Option "$AUTOMAPMNU_DRAWMAPBACK",			"am_drawmapback", "OnOff"
	Option "$AUTOMAPMNU_SHOWTRIGGERLINES",		"am_showtriggerlines", "MapTriggers"

	StaticText ""
	Option "$AUTOMAPMNU_PTOVERLAY",				"am_showportals", "OnOff"
	Slider "$AUTOMAPMNU_EMPTYSPACEMARGIN",		"am_emptyspacemargin", 0, 90, 5, 0

	StaticText ""
	Option "$AUTOMAPMNU_MARKFONT",				"am_markfont", "MapMarkFont"
	Option "$AUTOMAPMNU_MARKCOLOR",				"am_markcolor", "TextColors"
}

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

OptionMenu MapControlsMenu protected {
	Title "$MAPCNTRLMNU_TITLE"
	ScrollTop 2
	StaticTextSwitchable 	"$CNTRLMNU_SWITCHTEXT1", "$CNTRLMNU_SWITCHTEXT2", "ControlMessage"

	StaticText ""
	Control    "$CNTRLMNU_AUTOMAP",				"togglemap"

	StaticText ""
	MapControl "$MAPCNTRLMNU_PANLEFT",			"+am_panleft"
	MapControl "$MAPCNTRLMNU_PANRIGHT",			"+am_panright"
	MapControl "$MAPCNTRLMNU_PANUP",			"+am_panup"
	MapControl "$MAPCNTRLMNU_PANDOWN",			"+am_pandown"

	StaticText ""
	MapControl "$MAPCNTRLMNU_ZOOMIN",			"+am_zoomin"
	MapControl "$MAPCNTRLMNU_ZOOMOUT",			"+am_zoomout"

	StaticText ""
	MapControl "$MAPCNTRLMNU_TOGGLEZOOM",		"am_gobig"
	MapControl "$MAPCNTRLMNU_TOGGLEFOLLOW",		"am_togglefollow"
	MapControl "$MAPCNTRLMNU_TOGGLEGRID",		"am_togglegrid"

	StaticText ""
	MapControl "$MAPCNTRLMNU_SETMARK",			"am_setmark"
	MapControl "$MAPCNTRLMNU_CLEARMARK",		"am_clearmarks"
}

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

OptionMenu MapColorMenu protected {
	Title "$MAPCOLORMNU_TITLE"
	Submenu "$MAPCOLORMNU_CHEATMODE",					"MapColorMenuCheats"
	Submenu "$MAPCOLORMNU_OVERLAY",						"MapColorMenuOverlay"
	Submenu "$MAPCOLORMNU_OVCHEATMODE",					"MapColorMenuCheatsOverlay"
	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 ""
	SafeCommand "$MAPCOLORMNU_DEFAULTMAPCOLORS", 		"am_restorecolors"
}

OptionMenu MapColorMenuCheats protected {
	Title "$MAPCOLORMNU_CHEATMODE"
	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"
}

OptionMenu MapColorMenuOverlay protected {
	Title "$MAPCOLORMNU_OVERLAY"
	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"
}

OptionMenu MapColorMenuCheatsOverlay protected {
	Title "$MAPCOLORMNU_OVCHEATMODE"
	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_CENTERMESSAGES",			"con_centernotify", "OnOff"
	Option "$MSGMNU_SUBTITLES",					"inter_subtitles", "OnOff"
	StaticText ""
	Option "$MSGMNU_DEVELOPER", 				"developer", "DevMessageLevels"
	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"
}

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

OptionMenu ScoreboardOptions protected {
	Title "$SCRBRDMNU_TITLE"
	StaticText "$SCRBRDMNU_COOPERATIVE", 1
	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 "$SCRBRDMNU_DEATHMATCH", 1
	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 "$SCRBRDMNU_TEAMDEATHMATCH", 1
	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
	Submenu "$GMPLYMNU_DEATHMATCH",				"DeathmatchOptions"
	Submenu "$GMPLYMNU_COOPERATIVE",			"CoopOptions"
	StaticText ""
	Option "$GMPLYMNU_TEAMPLAY",				"teamplay",	"OnOff"
	Slider	"$GMPLYMNU_TEAMDAMAGE",				"teamdamage", 0, 1, 0.05,2
	StaticText ""
	Option "$GMPLYMNU_SMARTAUTOAIM",			"sv_smartaim", "SmartAim"
	StaticText ""
	Option "$GMPLYMNU_ALWAYSTALLY",				"sv_alwaystally", "AlwaysTally"
	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_INSTANTREACTION",			"sv_instantreaction", "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"
	Option "$GMPLYMNU_DOUBLESPAWN",				"sv_doublespawn", "YesNo"
	Option "$GMPLYMNU_MIRRORMODE",				"sv_mirrormode", "YesNo"
	Class "GameplayMenu"
}

OptionMenu DeathmatchOptions protected {
	Title 	"$GMPLYMNU_DEATHMATCH"

	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"
	Class "GameplayMenu"
}

OptionMenu CoopOptions protected {
	Title 	"$GMPLYMNU_COOPERATIVE"

	Option "$GMPLYMNU_MULTIPLAYERTHINGS",	 	"sv_nothingspawn", "NoYes"
	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"
}

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

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

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

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

OptionString Resamplers {
	"NoInterp",		"$OPTVAL_NOINTERPOLATION"
	"Linear",		"$OPTVAL_LINEAR"
	"Cubic",		"$OPTVAL_CUBIC"
	"Spline",		"$OPTVAL_SPLINE"
}

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

OptionMenu SoundOptions protected {
	Title "$SNDMNU_TITLE"
	StaticText "Volume"
	Slider "$MODMNU_MASTERVOLUME",		"snd_mastervolume", 0, 1, 0.05, 2
	Slider "$SNDMNU_SFXVOLUME",			"snd_sfxvolume", 0, 1, 0.05, 2
	Slider "$SNDMNU_MUSICVOLUME",		"snd_musicvolume", 0, 1, 0.05, 2
	Slider "$SNDMNU_MENUVOLUME",		"snd_menuvolume", 0, 1, 0.05, 2
	StaticText ""
	StaticText "Other"
	Option "$SNDMNU_MIDIDEVICE",		"snd_mididevice", "MidiDevices"
	Option "$SNDMNU_BACKGROUND",		"snd_background", "OnOff"
	Option "$SNDMNU_UNDERWATERREVERB",	"snd_waterreverb", "OnOff"
	Option "$SNDMNU_RANDOMIZEPITCHES",	"snd_pitched", "OnOff"
	Slider "$SNDMNU_CHANNELS",			"snd_channels", 32, 256, 8, 0
	StaticText ""
	StaticText "Advanced"
	Option "$ADVSNDMNU_HRTF",			"snd_hrtf", "AutoOffOn"
	ifoption(openal) {
		Option "$OPENALMNU_ENABLEEFX",			"snd_efx",			"OnOff"
		Option "$OPENALMNU_PLAYBACKDEVICE",		"snd_aldevice",		"ALDevices"
		Option "$OPENALMNU_RESAMPLER",			"snd_alresampler",	"ALResamplers"
	}
	Option "$ADVSNDMNU_SAMPLERATE",		"snd_samplerate", "SampleRates"
	Command "$SNDMNU_RESTART",			"snd_reset"
	StaticText ""
	Submenu "$ADVSNDMNU_ADLMIDI", "ADLOptions", 0, 1
	Submenu "$ADVSNDMNU_FLUIDSYNTH", "FluidsynthOptions", 0, 1
	Submenu "$SNDMNU_MODREPLAYER", "ModReplayerOptions", 0, 1
}

OptionMenu ADLMIDICustomBanksMenu protected {
	Title "$ADVSNDMNU_ADLBANKFILE"
}

OptionMenu FluidPatchsetMenu protected {
	Title "$ADVSNDMNU_SELCONFIG"
}

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

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 "$SNDMNU_MODREPLAYER"
	Command "$SNDMNU_RESTART",				"snd_reset"
	StaticText ""
	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"
	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
*
*=======================================*/
OptionMenu FluidsynthOptions protected {
	Title "$ADVSNDMNU_FLUIDSYNTH"
	Command "$SNDMNU_RESTART",				"snd_reset"
	StaticText ""
	LabeledSubMenu "$ADVSNDMNU_SELCONFIG",	"fluid_patchset", "FluidPatchsetMenu"
	Slider "$ADVSNDMNU_FLUIDGAIN",			"fluid_gain", 0, 10, 0.5, 1
	Option "$ADVSNDMNU_FLUIDINTERPOLATION", "fluid_interp", "OnOff"
	Option "$ADVSNDMNU_SAMPLERATE",			"fluid_samplerate", "SampleRates"
	Slider "$ADVSNDMNU_MIDIVOICES", 		"fluid_voices", 16, 4096, 16, 0
	Slider "$ADVSNDMNU_FLUIDTHREADS",		"fluid_threads", 1, 16, 1, 0
	StaticText ""
	StaticText "$ADVSNDMNU_REVERB"
	Option "$ADVSNDMNU_REVERB", 			"fluid_reverb", "OnOff"
	Slider "$ADVSNDMNU_FLUIDREVROOMSIZE", 	"fluid_reverb_roomsize", 0, 1, 0.1
	Slider "$ADVSNDMNU_FLUIDREVDAMPING", 	"fluid_reverb_damping", 0, 1, 0.1
	Slider "$ADVSNDMNU_FLUIDREVWIDTH", 		"fluid_reverb_width", 0, 1, 0.1
	Slider "$ADVSNDMNU_LEVEL", 				"fluid_reverb_level", 0, 1, 0.1
	StaticText ""
	StaticText "$ADVSNDMNU_CHORUS"
	Option "$ADVSNDMNU_CHORUS", 			"fluid_chorus", "OnOff"
	Slider "$ADVSNDMNU_MIDIVOICES", 		"fluid_chorus_voices", 1, 16, 1
	Slider "$ADVSNDMNU_LEVEL", 				"fluid_chorus_level", 0, 1, 0.1
	Slider "$ADVSNDMNU_FLUIDCHRSPEED", 		"fluid_chorus_speed", 0.1, 4, 0.1
	Slider "$ADVSNDMNU_FLUIDCHRDEPTH", 		"fluid_chorus_depth", 1, 16, 1
	// other CVARs need to be revieved for usefulness
}

OptionValue AdlVolumeModels {
	0, "$ADLVLMODEL_AUTO"
	1, "$ADLVLMODEL_GENERIC"
	2, "$ADLVLMODEL_NATIVE"
	3, "$ADLVLMODEL_DMX"
	4, "$ADLVLMODEL_APOGEE"
	5, "$ADLVLMODEL_WIN9X"
	6, "$ADLVLMODEL_DMX_FIXED"
	7, "$ADLVLMODEL_APOGEE_FIXED"
	8, "$ADLVLMODEL_AIL"
	9, "$ADLVLMODEL_WIN9XGENERIC"
	10, "$ADLVLMODEL_HMI"
	11, "$ADLVLMODEL_HMIOLD"
}

OptionMenu ADLOptions protected {
	Title "$ADVSNDMNU_ADLMIDI"
	Command "$SNDMNU_RESTART",				"snd_reset"
	StaticText ""
	LabeledSubmenu "$ADVSNDMNU_ADLBANKFILE", "adl_custom_bank", "ADLMIDICustomBanksMenu"
	Option "$ADVSNDMNU_ADLCUSTOMBANK", 	 	"adl_use_custom_bank", "OnOff"
	Option "$ADVSNDMNU_ADLPCM", 		 	"adl_pcm", "OnOff"
	StaticText ""
	Option "$ADVSNDMNU_RUNPCMRATE",		 	"adl_run_at_pcm_rate", "OnOff"
	Slider "$ADVSNDMNU_ADLNUMCHIPS", 	 	"adl_chips_count", 1, 8, 1, 0
	Option "$ADVSNDMNU_ADLFULLPAN", 	 	"adl_fullpan", "OnOff"
	Option "$ADVSNDMNU_ADLVLMODEL",		 	"adl_volume_model", "AdlVolumeModels"
}

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

OptionMenu NetworkOptions protected {
	Title "$NETMNU_TITLE"
	StaticText "$NETMNU_HOSTOPTIONS", 1
	SafeCommand "$NETMNU_HOST",				"host 10666", "$NETMNU_ADVICE"
	TextField "$NETMNU_MOTD",				"sv_motd"
	Option "$NETMNU_EXTRATICS",				"net_extratic", "ExtraTicMode"
	Option "$NETMNU_TICBALANCE",			"net_ticbalance", "OnOff"
	StaticText ""
	StaticText "$NETMNU_ADVDOPTIONS", 1
	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
	Option "$NETMNU_MOVEPREDICTION",		"sv_noprediction", "OffOn"
	TextField "$NETMNU_MASTERADDRESS",		"sv_masterserver"
}

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

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 "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 SpriteSortModes {
	0, "$OPTVAL_INACCURATEFAST"
	1, "$OPTVAL_ACCURATESLOW"
}

OptionValue ShadowMapQuality {
	0, "$OPTVAL_OFF"
	128, "$OPTVAL_LOW"
	256, "$OPTVAL_MEDIUM"
	512, "$OPTVAL_HIGH"
	1024, "$OPTVAL_EXTREME"
}

OptionMenu "VXTextureOptions" protected {
	Title "$RENDPREF_MNUTEXOPT"
	Option "$RENDPREF_TEXFILTER",		gl_texture_filter,				"FilterModes"
	Option "$RENDPREF_ANISOTROPIC",		gl_texture_filter_anisotropic,	"Anisotropy"
	Option "$RENDPREF_PRECACHETEX",		gl_precache,					"YesNo"
	Option "$RENDPREF_SORTDRAWLIST", 	gl_sort_textures,				"YesNo"
	Class "VXTextureOptions"
}

OptionMenu "VXShaderOptions" protected {
	Title "$RENDPREF_MNUSHADERS"
	StaticText "$RENDPREF_DYNLIGHTS"
	Option "$RENDPREF_DYNLIGHTS",			gl_lights,				"OnOff"
	Option "$RENDPREF_LIGHTSPRITES",		gl_light_sprites,		"YesNo"
	Option "$RENDPREF_LIGHTSHADOWMAP",		gl_light_shadowmap,		"ShadowMapQuality"
	Option "$RENDPREF_SMOOTHSHADOWS",		gl_light_smoothshadow,	"OnOff"
	StaticText ""
	StaticText "$RENDPREF_MNUPOSTPROCESS"
	Option "$RENDPREF_BLOOM",					gl_bloom,						"OnOff"
	Option "$RENDPREF_SSAO",					gl_ssao,						"SSAOModes"
	Option "$RENDPREF_FXAA",					gl_fxaa,						"FXAAQuality"
	Option "$RENDPREF_REFLEX",					gl_reflections,					"OnOff"
	Option "$RENDPREF_NTSC",					gl_ntsc,						"OnOff"
}

OptionMenu "ExtraVideoOptions" protected {
	Title "$DSPLYMNU_ADOPT"
	Option "$DSPLYMNU_CAPFPS",					"cl_capfps", "OffOn"
	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, 1.0, 0.25, 2
	StaticText ""
	StaticText "$RENDPREF_PERFOMANCE"
	ScaleSlider "$DSPLYMNU_SPRITECULL",			gl_sprite_distance_cull, 0.0, 8000.0, 500.0, "$OPTVAL_OFF"
	ScaleSlider "$DSPLYMNU_LINECULL",			gl_line_distance_cull, 0.0, 16000.0, 1000.0, "$OPTVAL_OFF"
	Option "$RENDPREF_SSBOLIGHTS",				gl_ssbo_lighting, "OnOff"
	Option "$RENDPREF_SPRITESORT",				gl_sprite_sort_mode, "SpriteSortModes"
	Option "$RENDPREF_PORTALS",					gl_portals, "OnOff"
	Slider "$RENDPREF_BUFFERS",					gl_totalallocatedbuffers, 1, 4, 1, 0 
	Slider "$RENDPREF_MIRRORRECURSION",			gl_mirror_recursions, 0, 10, 1, 0
	StaticText ""
	StaticText "$OPTMNU_MISCELLANEOUS"
	Slider "$RENDPREF_WPNLIGHTSTR",				gl_weaponlight, 0, 32, 2, 0
	Option "$RENDPREF_ENVIRONMENTMAPMIRROR",	gl_mirror_envmap, "OnOff"
	Option "$RENDPREF_ENV",						gl_enhanced_nightvision, "OnOff"
	Option "$RENDPREF_ENVSTEALTH",				gl_enhanced_nv_stealth, "EnhancedStealth"
	Slider "$RENDPREF_FOGLENGTH",				gl_distfog, 0, 500, 10
	StaticText ""
	StaticText "WARNING: This can use a lot of disk space"
	StaticText "but will make levels load way faster!"
	Option "$RENDPREF_CACHENODES",				"gl_cachenodes", "OnOff"
}