//
//  ___  ___   _   _   _    _     __  __ ____  __ __
// |_ _|| __| / \ | \_/ |  / \   /  \/ /| _  \ \ V /
//  | | | _| | o || \_/ | | o | / /\  / ||_| |  \ /
//  |_| |___||_n_||_| |_| |_n_|/_/  \/  |____/  |_|   2010
//										 
//
//########################################
//#####MENU CODE#### Don't touch this!!!##
//########################################
concommand.Add( "cl_default_keypad_hud", function()
	LocalPlayer():EmitSound("buttons/button9.wav")
	RunConsoleCommand("hudkeypad_red", "255")
	RunConsoleCommand("hudkeypad_green", "50")
	RunConsoleCommand("hudkeypad_blue", "20")
	RunConsoleCommand("hudkeypad_alpha", "200")
end )
concommand.Add( "cl_default_keypad_font", function()
	LocalPlayer():EmitSound("buttons/button9.wav")
	RunConsoleCommand("fontkeypad_red", "255")
	RunConsoleCommand("fontkeypad_green", "255")
	RunConsoleCommand("fontkeypad_blue", "255")
	RunConsoleCommand("fontkeypad_alpha", "255")
end )
function KeypadcrackerPanel( Panel )
	Panel:ClearControls()
	Panel:AddHeader()
	Panel:AddControl("Label", { 
		Text = "Cracks a keypad, after this was once successfully confirmed.",
		Description = "Cracks a keypad, after this was once successfully confirmed.",
	})
	Panel:AddControl("Button", {
		Label = "On / Off",
		Text = "...",
		Command = "cl_show_keypad_hud",
	})
	Panel:AddControl("Label", {
		Text = "The HUD:",
	})
	Panel:AddControl("Color", {
		Label = "Color",
		Red = "hudkeypad_red",
		Green = "hudkeypad_green",
		Blue = "hudkeypad_blue",
--		Alpha = "hudkeypad_alpha",
		ShowAlpha = "0",
		ShowHSV = "0",
		ShowRGB = "1",
		Multiplier = "255",
	})
	Panel:AddControl("Button", {
		Label = "Default HUD color",
		Text = "...",
		Command = "cl_default_keypad_hud",
	})
	Panel:AddControl("Label", {
		Text = "Font style:",
	})
	combobox = {}
	combobox.Label = "Font"
	combobox.MenuButton = 0
	combobox.Options = {}
	combobox.Options["HudSelectionText"] = {cl_keypadfont = "HudSelectionText"}
	combobox.Options["TabLarge"] = {cl_keypadfont = "TabLarge"}
	combobox.Options["BudgetLabel"] = {cl_keypadfont = "BudgetLabel"}
	combobox.Options["DefaultUnderline"] = {cl_keypadfont = "DefaultUnderline"}
	combobox.Options["DefaultFixedOutline"] = {cl_keypadfont = "DefaultFixedOutline"}
	combobox.Options["DefaultFixedDropShadow"] = {cl_keypadfont = "DefaultFixedDropShadow"}
	combobox.Options["ChatFont"] = {cl_keypadfont = "ChatFont"}
	combobox.Options["ConsoleText"] = {cl_keypadfont = "ConsoleText"}
	combobox.Options["UiBold"] = {cl_keypadfont = "UiBold"}
	Panel:AddControl("ComboBox", combobox)
	Panel:AddControl("Color", {
		Label = "Color",
		Red = "fontkeypad_red",
		Green = "fontkeypad_green",
		Blue = "fontkeypad_blue",
--		Alpha = "fontkeypad_alpha",
		ShowAlpha = "0",
		ShowHSV = "0",
		ShowRGB = "1",
		Multiplier = "255",
	})
	Panel:AddControl("Button", {
		Label = "Default font color",
		Text = "...",
		Command = "cl_default_keypad_font",
	})
	Panel:AddControl("CheckBox", {
		Label = "Show keypad index:",
		Description = "...",
		Command = "show_keypadindex",
	})
	Panel:AddControl("Slider", {
		Label = "Distance, until the index is shown.",
		Description = "...",
		Command = "keypadindex_distance",
		Type = "Float",
		min = "0",
		max = "10000",
	})
	Panel:AddControl("CheckBox", {
		Label = "Notifies, if a key was pressed:",
		Description = "...",
		Command = "keypad_notify",
	})
	combobox2 = {}
	combobox2.Label = "Notify style"
	combobox2.MenuButton = 0
	combobox2.Options = {}
	combobox2.Options["NOTIFY_GENERIC"] = {keypad_notify_styl = "0"}
	combobox2.Options["NOTIFY_ERROR"] = {keypad_notify_styl = "1"}
	combobox2.Options["NOTIFY_UNDO"] = {keypad_notify_styl = "2"}
	combobox2.Options["NOTIFY_HINT"] = {keypad_notify_styl = "3"}
	combobox2.Options["NOTIFY_CLEANUP"] = {keypad_notify_styl = "4"}
	Panel:AddControl("ComboBox", combobox2)
	Panel:AddControl("Label", {
		Text = "The keypad scan sounds:",
	})
	Panel:AddControl("CheckBox", {
		Label = "Loop keypad scan sounds?",
		Description = "...",
		Command = "keypad_sounds",
	})
	Panel:AddControl("Label", {
		Text = "Information:",
	})
	Panel:AddControl("Label", {
		Text = "The HUD is shown, if you look on a keypad.",
	})
	Panel:AddControl("Label", {
		Text = "The font is the text style on the HUD and of the index, if shown.",
	})
	Panel:AddControl("Label", {
		Text = "The index is a unique identification for each keypad.",
	})
end
function AddKeypadCrackerMenu()
	spawnmenu.AddToolMenuOption(
		"Options",
		"4ndy's cheats",
		"Keypad Cracker",
		"#Keypad Cracker",
		"",
		"",
		KeypadcrackerPanel )
end
hook.Add("PopulateToolMenu", "PopulateToolMenuKeypadcracker", AddKeypadCrackerMenu)