LISTMENU "MainMenu"
{
	Font "BigFont", "Untranslated"
	Selector "M_SKULL1", -32, -5
	Linespacing 16
	Font "BigFont", "Red"
	
	IfGame(Doom, Chex)
	{
		StaticPatch 94, 2, "M_DOOM"
		Position 97, 72
		Position 97, 64
	}

	PatchItem "M_NGAME", "n", "PlayerclassMenu"
	PatchItem "M_MOPT", "m", "GOptionsMenu"
	
	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"
	}
	PatchItem "M_QUITG", "q", "QuitMenu"
}

OptionMenu "GOptionsMenu"
{
	Title "Ghosted II Options"
	StaticText " "
	StaticText "Serverside", 1
	Submenu "Gameplay settings", "GhostedGameplay"
	StaticText " "
	StaticText "Clientside ", 1
	Submenu "Effects", "GhostedEffects"
	Submenu "Misc", "GhostedMiscClient"
	Submenu "Sounds", "GhostedSounds"
}

OptionMenu "GhostedSounds"
{
	Title "Ghosted sound settings"
	StaticText " "
	StaticText "Note: this is applied on top of default sound volume"
	Slider "Ambience volume multiplier", "g2_snd_ambienceVolume", 0, 1, 0.05
	Option "Allow contextual music change", "g2_snd_disableMusicChange", noyes
}


OptionValue "GhostedInventoryHints"
{
	0, "No"
	1, "Item descriptions only"
	2, "Yes"
}

OptionMenu "GhostedMiscClient"
{
	Title "Misc settings"
	StaticText " "
	Option "Short intro", "g2_cl_shortIntro", yesno
	Option "Allow item wasting", "g2_cl_wasteItems", yesno
	Option "Show inventory tips", "g2_cl_inventoryHints", ghostedInventoryHints 
	Option "Display tips", "G2_cl_ShowTips", yesno 
	Option "Show Achievement notifications", "g2_cl_ShowAchievements", yesno 
}

OptionValue "GhostedEvents"
{
	-1, "Autodetect (Zandronum)"
	0, "None"
	1, "Christmas"
}

OptionMenu "GhostedGameplay"
{
	Title "Gameplay settings"
	StaticText " "
	Option "Gamemode", "G2_Gamemode", "GhostedGamemode"
	StaticText " "
	/*StaticText "Ghosted", 1
	Option "Players can become ghosts", "G2_Vs_Enable", yesno
	Option "Force players into ghosts?", "G2_Vs_ForcePlayers", yesno
	Option "Reselect on ragequit?", "G2_Vs_ReselectOnDisconnect", yesno*/

	StaticText " "
	StaticText "Special",1
	Option "Event", "g2_event", ghostedEvents

	/*StaticText " "
	StaticText "Pages",1
	Slider "Force page count to ", "G2_PageCount", 0, 50, 1
	Slider "Additional page per each X player", "G2_PageAdder", 0, 16, 1
	Slider "How many additional pages?", "G2_PageAdderCount", 1, 16, 1*/

	StaticText " "
	StaticText "Extra",1
	Option "Allow Ghost Camera", "g2_sv_ghostCam", onoff
	
}


OptionValue "GhostedFlashlight"
{
	0, "Force legacy flashlight (Zandronum 1.0+)"
	1, "New simple (GZDoom 3.3.0+)"
	2, "New complex (GZDoom 3.3.0+)"
}


OptionMenu "GhostedEffects"
{
	Title "Effects"
	Option "Ghost effects", "g2_cl_ghostEffects", onoff
	Option "Screen smoke effects", "g2_cl_screenSmokeEffects", onoff
	Option "Torch fire particles", "g2_cl_torchEffects", onoff
	Option "Weather particles", "g2_cl_weatherEffects", onoff
	Option "Snow physics", "g2_cl_snowPhysics", onoff
	Slider "Snow particles", "g2_cl_snowParticleCount", 64, 1024, 64
	StaticText " "
	Option "Flashlight mode", "g2_cl_flashlightSpotlight", GhostedFlashlight
	StaticText " "
	StaticText "Legacy flashlight", 1
	Slider "draw distance (0 is inf)", "G2_cl_flashlightDistance", 0, 4096, 512
	Slider "light LOD", "G2_Cl_FlashlightReduction", 1, 8, 1
	StaticText " "
	StaticText "Note: Some settings are always disabled in Zandronum"
}

OptionMenu "SourceportSettings" 
{
	Title "Engine settings"
	
	Option "Source Port", "ENGINE_Sourceport", "EngineSourcePort"
	StaticText " "
	StaticText "Change at your own risk!"

	Option "Console Command", "ENGINE_ConsoleCommand", "EngineFeatures"
	Option "Console Player Number", "Engine_ConsolePlayerNumber", "EngineFeatures"
	Option "Desynchronized clientside scripts", "ENGINE_DesyncAcs", "EngineFeatures"
	Option "Dynamic Lighting", "ENGINE_DynamicLighting", "EngineFeatures"
	Option "Hudmessage Extensions", "ENGINE_HudmsgUpgrade", "EngineFeatures"
	Option "SetCvar", "ENGINE_SetCvar", "EngineFeatures"
	Option "Survival Gamemode", "ENGINE_Survival", "EngineFeatures"
	StaticText " "
	StaticText "call 'puke 414' ingame to see list of aviable settings and their values."
	StaticText "Positive number forces true"
	StaticText "Negative number forces false"
	
}

OptionMenu "DeveloperSettings"
{
	Title "Developer settings"

	Option "Override Ghost", "G2_OverrideGhost", "GhostedGhosts"
	Slider "Force ghost count to ", "G2_GhostCount", 0, 10, 1
	StaticText " "
	Command "Debug General", "set G2_Debug 1; echo \"Debugging messages enabled...\""
	Command "Stop Debug", "set G2_Debug 0 ; set G2_DebugLight 0 ; set G2_DebugGhost 0 ; set G2_DebugAI 0 ; echo \"Debugging messages disabled\""
	StaticText " "
}

OptionValue "GhostedGhosts"
{
	0, "0. No"
	1, "1.  Slenderman"
	2, "2.  The Girl"
	3, "3.  Skeleton"
	4, "4.  Shadow"
	5, "5.  ---"
	6, "6.  ---"
	7, "7.  ---"
	8, "8.  ---"
	9, "9.  ---"
	10,"10. ---"
}

OptionValue "GhostedGamemode"
{
	0, "Random"
	1, "Classic"
	2, "Survival"
}

OptionValue "EngineSourcePort"
{
	0, "Autodetect"
	1, "ZDoom"
	2, "GZDoom"
	3, "Zandronum"
	4, "QZDoom"
}

OptionValue "EngineFeatures"
{
	-1, "No"
	0, "Autodetect"
	1, "Yes"
}


OptionMenu "CustomizeControls"
{
	Title "CUSTOMIZE CONTROLS"
	ScrollTop 2
	StaticTextSwitchable 	"ENTER to change, BACKSPACE to clear", "Press new key for control, ESC to cancel", "ControlMessage"
	StaticText 	""
	StaticText 	"Controls", 1
	Control 	"Primary Attack",		"+attack"
	Control 	"Secondary Attack",		"+altattack"
	Control 	"Use / Open",			"+use"
	Control 	"Move forward",			"+forward"
	Control 	"Move backward",		"+back"
	Control 	"Strafe left",			"+moveleft"
	Control 	"Strafe right",			"+moveright"
	Control 	"Jump",					"+jump"
	Control 	"Crouch",				"+crouch"
	//Control 	"Fly / Swim up",		"+moveup"
	//Control 	"Fly / Swim down",		"+movedown"
	Control 	"Run",					"+speed"
	Control 	"Show map",		"togglemap"
	

	//StaticText 	"Inventory", 1
	//Control 	"Activate item",		"invuse"
	//Control 	"Next item",			"invnext"
	//Control 	"Previous item",		"invprev"
	//Control 	"Drop item",			"invdrop"

	StaticText 	"Multiplayer",1
	Control 	"Show Scoreboard",		"+showscores"
	Control 	"Say",					"messagemode"
	Control 	"Team say",				"messagemode2"
	Control 	"Coop Spy (player camera)",		"spynext"
	StaticText 	""
	StaticText 	"Misc.", 1
	Control 	"Screenshot",			"screenshot"
	Control  	"Open console",			"toggleconsole"
}