local scripts = {
	checkbutton = {
		OnShow = function() this:SetChecked(this.self:Get(this.setting)) end,
		OnClick = function() this.self:Set(this.setting,this:GetChecked() and true or false); this.self:UpdateSettings() end,
	},
	checkbutton2 = {
		OnShow = function() this:SetChecked(this.self:Get(this.setting)) end,
		OnClick = function() this.self:Set(this.setting,this:GetChecked() and true or false); Notifications:ToggleCombatRegX() end,
	},
	slider = {
		OnValueChanged = function()
			local value = this:GetValue()
			local formatstring
			if math.floor(value) == value then 
				formatstring = "%d"
			else
				formatstring = "%.2f"
			end
			getglobal(this:GetName().."Value"):SetText(string.format(formatstring,value))
		end,
	},
	editbox = {
		OnEditFocusGained = function() this:HighlightText() end,
		OnEditFocusLost = function() this:HighlightText(0,0) end,
		OnEscapePressed = function()
			local text = this:GetText()
			if text == "" then
				this:ClearFocus()
			else
				this:SetText("")
			end
		end,
		OnEnterPressed = function() this:ClearFocus() end,
	},
	dropdown = {
		OnShow = function()
			getglobal(this:GetName().."Text"):SetText(this.text)
		end,
	},
}

local action
local function dropdown()
	local DROPDOWNLIB_MENU_LEVEL = DropDownLib:MenuLevel()
	local DROPDOWNLIB_MENU_VALUE = DropDownLib:MenuValue()
	if DROPDOWNLIB_MENU_LEVEL == 1 then
		local info = DropDownLib:GetTable()
		info.notCheckable = 1
		info.hasArrow = 1
		info.value = "create"
		info.text = "Create New"
		DropDownLib:AddButton(info,1)
		info = DropDownLib:GetTable()
		info.notCheckable = 1
		info.hasArrow = 1
		info.value = "manage"
		info.text = "Manage Existing"
		DropDownLib:AddButton(info,1)
	else
		if DROPDOWNLIB_MENU_LEVEL == 2 then action = DROPDOWNLIB_MENU_VALUE end
		if action == "create" then
			Notifications:DropDownCreate()
		elseif action == "manage" then
			Notifications:DropDownManage()
		end
	end
end

local guitable = {
	title = "Notifications Main Menu",
	name = "NotificationsMenuFrame",
	scripts = {
		OnShow = function() Notifications:ClearData() end,
	},
	{ --column 1
		{
			title = "Begin Here!",
			type = "dropdown",
			tooltiptext = "Choose an action.",
			func = dropdown,
			scripts = scripts.dropdown,
			data = {
				text = "Choose..."
			},
		},
		{
			{
				title = "Trigger",
				name = "NotificationsTriggerEditBox",
				type = "editbox",
				tooltiptext = "Enter here the name of the spell, item, debuff, or buff you want to be the trigger.  Enter 'all' to make anything trigger it.",
				scripts = scripts.editbox,
				overridescripts = {
					OnTextChanged = function() 
						local text = this:GetText() 
						if text == "all" or Notifications:GetCurrent("event") == "Combat Log" then 
							NotificationsPartialCheckButton:Hide()
						else 
							NotificationsPartialCheckButton:Show() 
						end 
					end,
				},
			},
			{
				title = "Stat Amount",
				name = "NotificationsStatEditBox",
				type = "editbox",
				tooltiptext = "Enter here amount of health or mana/energy/rage you want to trigger the Notification.  Prefix the number with a '+' if you want it sent after the stat INCREASES to that amount, or a '-' for when it DECREASES to that amount.  Append the number with a '%' to make the number act as a percentage.",
				scripts = scripts.editbox,
			},
		},
		{
			title = "Usage",
			type = "slider",
			name = "NotificationsUsageSlider",
			tooltiptext = "Set to 0 for this Notification to be sent all the time, or a positive number for it to be picked from randomly amongst all others you select as positive numbers for this event+trigger pair.  The actual number represents the percent chance a random Notification is sent at all (100 for one to be picked all the time, 5 for 5% of the time, etc.).",
			scripts = {
				OnValueChanged = function()
					local value = this:GetValue()
					local text
					if value == 0 then
						text = "all"
					else
						text = string.format("Rand (%d)",value)
					end
					getglobal(this:GetName().."Value"):SetText(text)
				end,
			},
			lowval = 0,
			highval = 100,
			step = 5,
		},
		{
			{
				title = "Message",
				name = "NotificationsFormatEditBox",
				type = "editbox",
				tooltiptext = "Enter here the message you want sent.  Use %s for the trigger, %t for the target (if applicable), and %d for amount of damage (if applicable).",
				scripts = scripts.editbox,
			},
			{
				title = "Timer Info",
				name = "NotificationsTimerEditBox",
				type = "editbox",
				tooltiptext = "Enter here information about the timer you want created.  It must be in this format: 'Target:... Spell:... Duration:...', where you put whatever you want in the '...'s.  E.g.:'Target:Oh Noes! Spell:%s Duration:5m30s'.  They must be in the proper order and properly capitalized!  If you do not want a target name, set it to 'NONE', e.g. 'Target:NONE'.  ",
				scripts = scripts.editbox,
			},
			{
				title = "Sound File",
				name = "NotificationsSoundEditBox",
				type = "editbox",
				tooltiptext = "Enter here sound file that should be played.  This file should be placed in the 'Files' folder of the 'Ash_Core' addon. The only default sound is expalert.wav.",
				scripts = scripts.editbox,
			},
		},
		{
			{
				title = "Chat Channel",
				name = "NotificationsChatEditBox",
				type = "editbox",
				tooltiptext = "Enter here the chat you want your message sent to. Type 'auto' for auto selection of 'raid' or 'party' (if not grouped, no msg will be sent).  Enter a number for a specific chat channel.  Enter 'whisper' for it to be sent as a whisper to the target.",
				scripts = scripts.editbox,
			},
			{
				title = "Offset",
				type = "slider",
				name = "NotificationsAlertLocSlider",
				tooltiptext = "Enter here the offset from the center of your screen you want your alert to appear.  Positive means up, negative means down.",
				scripts = scripts.slider,
				lowval = -150,
				highval = 150,
				step = 5,
			},
		},
		{
			{
				title = "Time",
				name = "NotificationsTimeEditBox",
				type = "editbox",
				tooltiptext = "Enter here how many seconds you want to remain on the timer when this event is sent.  Only integer amounts are accepted.  This will map to '%d' if your type has a message.  You can use 's','m','h', or 'd' to represent seconds, minutes, hours, or days, e.g. '5m 2s'.",
				scripts = scripts.editbox,
			},
		},
	},
	{ --column 2
		{
			title = "Enabled",
			type = "checkbutton",
			tooltiptext = "Check this to enable the addon; uncheck to disable.",
			scripts = scripts.checkbutton,
			data = {
				setting = "status",
			},
		},
		{
			title = "Combat RegX",
			type = "checkbutton",
			tooltiptext = "Check this to enable combat log scanning; uncheck to disable.",
			scripts = scripts.checkbutton2,
			data = {
				setting = "combatregx",
			},
		},
		"BREAK",
		{
			title = "Color",
			name = "NotificationsColorSwatch",
			type = "colorselect",
			tooltiptext = "Click this icon to choose the color for the message being sent.",
		},
		{
			title = "Partial Matches",
			name = "NotificationsPartialCheckButton",
			type = "checkbutton",
			tooltiptext = "Check this to look for partial matches of the text you entered for the trigger; uncheck to look for an exact match.",
		},
		{
			title = "Create!",
			name = "NotificationsDoneButton",
			type = "button",
			tooltiptext = "Creates the Notification.",
			scripts = {
				OnClick = function() Notifications:ParseMenu() end,
			},
		},
		{
			title = "Timer Settings",
			type = "button",
			tooltiptext = "Opens the options window for customizing the timers that can be made.",
			scripts = {
				OnClick = function() this.holder.place.column.menu:Hide(); Notifications:ShowTimerGUI(); end,
			},
		},
		{
			title = "Profiles",
			type = "button",
			tooltiptext = "Opens the Profile Creator menu.",
			buffer = 10,
			scripts = {
				OnClick = function() ProfileLib:ShowGUI() end,
			},
		},
		{
			title = "Close",
			type = "button",
			tooltiptext = "Closes this window.",
			scripts = {
				OnClick = function() this.holder.place.column.menu:Hide() end,
			},
		},
	},
}

function Notifications:ShowGUI()
	if not NotificationsMenuFrame then
		Notifications:CreateGUI(guitable)
		local f = NotificationsMenuFrame:CreateFontString("NotificationsMenuFrameInfo")
		f:SetPoint("TOPLEFT","NotificationsMenuFrame","BOTTOMLEFT",9,0)
		f:SetFontObject(GameFontHighlight)
		f:SetJustifyH("LEFT")
	end
	NotificationsMenuFrame:Show()
end

local timerscripts = {
	checkbutton = {
		OnShow = function() this:SetChecked(this.self:Get(this.setting)) end,
		OnClick = function() this.self:Set(this.setting,this:GetChecked() and true or false); this.self:UpdateSettings() end,
	},
	slider = {
		OnShow = function() this.real = false this:SetValue(this.self:Get(this.setting)) this.real = true end,
		OnValueChanged = function()
			local value = this:GetValue()
			local formatstring
			if math.floor(value) == value then 
				formatstring = "%d"
			else
				formatstring = "%.2f"
			end
			getglobal(this:GetName().."Value"):SetText(string.format(formatstring,value))
			if this.real then
				this.self:Set(this.setting,value)
				this.self:UpdateSettings()
			end
		end,
	},
	editbox = { --initialized with a string
		OnEditFocusGained = function() this:SetText(this.self:Get(this.setting) or ""); this:HighlightText() end,
		OnEditFocusLost = function() this:HighlightText(0,0) end,
		OnShow = function() this:SetText(this.self:Get(this.setting) or "") end,
		OnEscapePressed = function()
			local text = this:GetText()
			if text == "" then
				this:ClearFocus()
			else
				this:SetText("")
			end
		end,
		OnEnterPressed = function() this.self:Set(this.setting,this:GetText()); this:ClearFocus() end,
	},
	dropdown = {
		OnShow = function()
			getglobal(this:GetName().."Text"):SetText(this.self:Get(this.setting))
		end,
	},
	dropdown2 = {
		OnShow = function()
			getglobal(this:GetName().."Text"):SetText(this.text)
		end,
	},
}

local function timerdropdown(frame,setting,values)
	local info
	for index,value in ipairs(values) do
		info = DropDownLib:GetTable()
		info.text = value
		info.checked = (DoTimer:Get(setting) == value) and 1
		info.func = function() 
			DoTimer:Set(setting,value) 
			DoTimer:UpdateSettings() 
			getglobal(frame:GetName().."Text"):SetText(value)
			DropDownLib:CloseDropDownMenus()
		end
		DropDownLib:AddButton(info,1)
	end
end

local function colordropdown()
	local info
	local DROPDOWNLIB_MENU_LEVEL = DropDownLib:MenuLevel()
	local DROPDOWNLIB_MENU_VALUE = DropDownLib:MenuValue()
	if DROPDOWNLIB_MENU_LEVEL == 2 then
		local subtype = DROPDOWNLIB_MENU_VALUE
		for index,value in ipairs({"begin","half","final"}) do
			info = DropDownLib:GetTable()
			info.text = value
			info.notCheckable = 1
			info.hasColorSwatch = 1
			info.r = Notifications:Get("colors",category,subcat,value,"r") or Notifications:GetTimerData()[subcat].colors[value]["r"]
			info.g = Notifications:Get("colors",category,subcat,value,"g") or Notifications:GetTimerData()[subcat].colors[value]["g"]
			info.b = Notifications:Get("colors",category,subcat,value,"b") or Notifications:GetTimerData()[subcat].colors[value]["b"]
			info.swatchFunc = function()
				local r,g,b = DropDownLibColorPicker:GetColorRGB()
				Notifications:Set("colors",category,subcat,value,"r",r)
				Notifications:Set("colors",category,subcat,value,"g",g)
				Notifications:Set("colors",category,subcat,value,"b",b)
				for i,v in ipairs({"begin","half","final"}) do
					if not Notifications:Get("colors",category,subcat,v) then
						Notifications:Set("colors",category,subcat,v,"r",Notifications:GetTimerData()[subcat].colors[v]["r"])
						Notifications:Set("colors",category,subcat,v,"g",Notifications:GetTimerData()[subcat].colors[v]["g"])
						Notifications:Set("colors",category,subcat,v,"b",Notifications:GetTimerData()[subcat].colors[v]["b"])
					end
				end
				Notifications:UpdateSettings()
			end
			DropDownLib:AddButton(info,2)
		end
	elseif DROPDOWNLIB_MENU_LEVEL == 1 then
		info = DropDownLib:GetTable()
		info.text = "All Timers"
		local checked
		if Notifications:Get("colors","type","default") then checked = 1 end
		info.checked = checked
		info.value = "default"
		info.hasArrow = 1
		info.func = function() 
			if checked then 
				Notifications:Set("colors","type","default",nil) 
				Notifications:UpdateSettings()
			end 
		end
		DropDownLib:AddButton(info,1)
		info = DropDownLib:GetTable()
		info.text = "Bar Text"
		local colors = Notifications:Get("bartextcolor")
		info.r = colors.r
		info.g = colors.g
		info.b = colors.b
		info.hasColorSwatch = 1
		local checked
		local currcolor = Notifications:Get("bartextcolor")
		local defcolor = Notifications:GetDefault("bartextcolor")
		if not (currcolor.r == defcolor.r and currcolor.g == defcolor.g and currcolor.b == defcolor.b) then checked = 1 end
		info.checked = checked
		info.func = function() if checked then Notifications:Set("bartextcolor",nil) end end
		info.swatchFunc = function()
			local r,g,b = DropDownLibColorPicker:GetColorRGB()
			Notifications:Set("bartextcolor","r",r)
			Notifications:Set("bartextcolor","g",g)
			Notifications:Set("bartextcolor","b",b)
			Notifications:UpdateSettings()
		end
		DropDownLib:AddButton(info,1)
		info = DropDownLib:GetTable()
		info.text = "Ghost Timers"
		local colors = DoTimer:Get("ghostcolor")
		info.r = colors.r
		info.g = colors.g
		info.b = colors.b
		info.hasColorSwatch = 1
		local checked
		local currcolor = Notifications:Get("ghostcolor")
		local defcolor = Notifications:GetDefault("ghostcolor")
		if not (currcolor.r == defcolor.r and currcolor.g == defcolor.g and currcolor.b == defcolor.b) then checked = 1 end
		info.checked = checked
		info.func = function() if checked then Notifications:Set("ghostcolor",nil) end end
		info.swatchFunc = function()
			local r,g,b = DropDownLibColorPicker:GetColorRGB()
			Notifications:Set("ghostcolor","r",r)
			Notifications:Set("ghostcolor","g",g)
			Notifications:Set("ghostcolor","b",b)
			Notifications:UpdateSettings()
		end
		DropDownLib:AddButton(info,1)
		info = DropDownLib:GetTable()
		info.text = "Bar Background"
		local colors = DoTimer:Get("barbackgroundcolor")
		info.r = colors.r
		info.g = colors.g
		info.b = colors.b
		info.hasColorSwatch = 1
		local checked
		local currcolor = Notifications:Get("barbackgroundcolor")
		local defcolor = Notifications:GetDefault("barbackgroundcolor")
		if not (currcolor.r == defcolor.r and currcolor.g == defcolor.g and currcolor.b == defcolor.b) then checked = 1 end
		info.checked = checked
		info.func = function() if checked then Notifications:Set("barbackgroundcolor",nil) end end
		info.swatchFunc = function()
			local r,g,b = DropDownLibColorPicker:GetColorRGB()
			Notifications:Set("barbackgroundcolor","r",r)
			Notifications:Set("barbackgroundcolor","g",g)
			Notifications:Set("barbackgroundcolor","b",b)
			Notifications:UpdateSettings()
		end
		DropDownLib:AddButton(info,1)
	end
end

local function timerotherdropdown()
	local frame = this:GetParent()
	if frame.setting and frame.values then 
		timerdropdown(frame,frame.setting,frame.values) 
	end 
end

local timerguitable = {
	title = "Notifications Timer Settings",
	name = "NotificationsTimerMenuFrame",
	{ --column 1
		{
			title = "Enabled",
			type = "checkbutton",
			tooltiptext = "Turns the addon on or off, default state: on.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "status",
			},
		},
		{
			title = "Locked",
			type = "checkbutton",
			tooltiptext = "Locks the addon, hiding the drag icon, default state: unlocked.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "locked",
			},
		},
		{
			title = "Names",
			type = "checkbutton",
			tooltiptext = "Toggles the showing of target names, default state: shown.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "names",
			},
		},
		{
			title = "Clickable",
			type = "checkbutton",
			tooltiptext = "Determines if timers can be clicked: rightclick to remove, default state: on.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "clickable",
			},
		},
		{
			title = "Show Tenths",
			type = "checkbutton",
			tooltiptext = "Determines if the displayed duration on timers is accurate to .1 second, else to 1 second, default state: off.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "tenths",
			},
		},
		{
			title = "Tooltips",
			type = "checkbutton",
			tooltiptext = "Determines if tooltips will be shown when you mouse over timers, default state: on.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "tooltips",
			},
		},
		{
			title = "Icons",
			type = "checkbutton",
			tooltiptext = "Determines if the icons in the bar format will be shown, default state: shown.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "icons",
			},
		},
		{
			title = "Reversed",
			type = "checkbutton",
			tooltiptext = "Determines if the timers in 'bar' format will grow instead of shrink, default state: off.",
			scripts = scripts.checkbutton,
			data = {
				setting = "reversed",
			},
		},
		{
			title = "Expire Alert",
			type = "checkbutton",
			tooltiptext = "Determines if the timer icon (in icons format) highlights for 2 seconds at less than 5 seconds remaining, default state: on.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "expalert",
			},
		},
		{
			title = "Play Sounds",
			type = "checkbutton",
			tooltiptext = "Determines if a sound will be played when a timer hits five seconds left, default state: off.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "playsound",
			},
		},
		{
			title = "Ghost Timers",
			type = "checkbutton",
			tooltiptext = "Determines if ghost timers will be created or not.  Ghost timers are created when timers expire, default state: on.",
			scripts = timerscripts.checkbutton,
			data = {
				setting = "ghosts",
			},
		},
	},
	{ --column 2
		{
			title = "Scale",
			type = "slider",
			tooltiptext = "Changes the relative size of the interface, default value: 1.",
			scripts = timerscripts.slider,
			lowval = .5,
			highval = 1.25,
			step = .05,
			data = {
				setting = "scale",
			},
		},
		{
			title = "Timer Scale",
			type = "slider",
			tooltiptext = "Changes the relative size of the debuff icons of the interface, default value: 1.",
			scripts = timerscripts.slider,
			lowval = .5,
			highval = 2,
			step = .05,
			data = {
				setting = "buttonscale",
			},
		},
		{
			title = "Bar Length",
			type = "slider",
			tooltiptext = "Determines how long the bar are in Bars format, or how much text is shown in Text format, default 175.",
			scripts = timerscripts.slider,
			lowval = 50,
			highval = 250,
			step = 5,
			data = {
				setting = "barlength",
			},
		},
		{
			title = "Timer Spacing",
			type = "slider",
			tooltiptext = "Determines how spaced out the timers are from each other, default 5.",
			scripts = timerscripts.slider,
			lowval = 0,
			highval = 20,
			step = 1,
			data = {
				setting = "timerspacing",
			},
		},
		{
			title = "Target Spacing",
			type = "slider",
			tooltiptext = "Determines how spaced out the targets are from each other, default 15.",
			scripts = timerscripts.slider,
			lowval = 0,
			highval = 30,
			step = 1,
			data = {
				setting = "targetspacing",
			},
		},
		{
			title = "Alpha",
			type = "slider",
			tooltiptext = "Determines the overall alpha of the timers.  1 means fully opaque; 0 means completely translucent, default 1.",
			scripts = timerscripts.slider,
			lowval = 0,
			highval = 1,
			step = .05,
			data = {
				setting = "alpha",
			},
		},
		{
			title = "Ghost Duration",
			type = "slider",
			tooltiptext = "Determines how long, in seconds, ghost timers will stay on the screen, default 5.",
			scripts = timerscripts.slider,
			lowval = 1,
			highval = 10,
			step = 1,
			data = {
				setting = "ghostdata",
			},
		},
		{
			title = "Bar Texture",
			type = "slider",
			tooltiptext = "Determines the index of which bar texture will be used, default 4.",
			scripts = timerscripts.slider,
			lowval = 1,
			highval = 24,
			step = 1,
			data = {
				setting = "bartexture",
			},
		},
		{
			title = "Fade In Time",
			type = "slider",
			tooltiptext = "Determines how long, in seconds, timers will take to fade in, default 1.",
			scripts = scripts.slider,
			lowval = 0,
			highval = 5,
			step = 1,
			data = {
				setting = "fadeintime",
			},
		},
		{
			title = "Fade Out Time",
			type = "slider",
			tooltiptext = "Determines how long, in seconds, timers will take to fade out, default 3.",
			scripts = scripts.slider,
			lowval = 0,
			highval = 5,
			step = 1,
			data = {
				setting = "fadeouttime",
			},
		},
		{
			title = "Bar Msg",
			type = "editbox",
			tooltiptext = [[
				Allows you to customize the text inside the bar / shown in 'text only' format.
				
				Valid formatting codes:
				%s: spell name
				%d: time remaining
				%t: spell's target
				
				Press ENTER when finished typing.]],
			scripts = timerscripts.editbox,
			data = {
				setting = "barmsg",
			},
		},
	},
	{ --column 3
		{
			title = "Reset",
			type = "button",
			tooltiptext = "Resets all settings to their default value.",
			buffer = 10,
			scripts = {
				OnClick = function() 
					this.self:ClearSettings() 
					DoTimerMenuFrame:Hide()
					DoTimerMenuFrame:Show()
				end,
			},
		},
		{
			title = "Reset Position",
			type = "button",
			tooltiptext = "Resets the position of the drag icon to the middle of the screen.",
			buffer = 10,
			scripts = {
				OnClick = function() this.self:Set("offsetX",nil); this.self:UpdateSettings() end,
			},
		},
		{
			title = "Show Preview",
			type = "button",
			tooltiptext = "Shows the interface for the current settings for 3 targets and 4 debuffs.",
			buffer = 10,
			scripts = {
				OnClick = function() this.self:ShowTimers(3,4) end,
			},
		},
		{
			title = "Hide Preview",
			type = "button",
			tooltiptext = "Hides the preview created from the above button, as well as any other timers.",
			buffer = 10,
			scripts = {
				OnClick = function() this.self:RemoveAllTimers() end,
			},
		},
		{
			title = "Timer Format",
			type = "dropdown",
			tooltiptext = "Determines if the timers will be displayed as bars, icons, or text, default bars.",
			func = timerotherdropdown,
			scripts = timerscripts.dropdown,
			data = {
				setting = "format",
				values = {"bars","icons","text"},
			},
		},
		{
			title = "Target Layout",
			type = "dropdown",
			tooltiptext = "Sets the direction in which new target tables are added, default value: left.",
			func = timerotherdropdown,
			scripts = timerscripts.dropdown,
			data = {
				setting = "targetlayout",
				values = {"up","down","left","right"},
			},
		},
		{
			title = "Timer Layout",
			type = "dropdown",
			tooltiptext = "Sets the direction in which new debuff timers are added, default value: down.",
			func = timerotherdropdown,
			scripts = timerscripts.dropdown,
			data = {
				setting = "timerlayout",
				values = {"up","down","left","right"},
			},
		},
		{
			title = "Sorting Method",
			type = "dropdown",
			tooltiptext = "Sets the manner in which debuffs are sorted: time added or time remaining, and ascending or descending, default value: remaining (D).",
			func = timerotherdropdown,
			scripts = timerscripts.dropdown,
			data = {
				setting = "sortmethod",
				values = {"added (A)","added (D)","remaining (A)","remaining (D)","alphabetical (A)","alphabetical (D)"},
			},
		},
		{
			title = "Seconds Format",
			type = "dropdown",
			tooltiptext = "Sets the manner in which the time string is displayed when less than 1 minute remains on the timer.",
			func = timerotherdropdown,
			scripts = timerscripts.dropdown,
			data = {
				setting = "secondsformat",
				values = {"##",":##","0:##"},
			},
		},
		{
			title = "Colors",
			type = "dropdown",
			tooltiptext = "Lets you set the color of specific timers, timer types, and the bar text.",
			func = colordropdown,
			scripts = timerscripts.dropdown2,
			data = {
				text = "Choose...",
			},
		},
		"BREAK",
		{
			title = "Return",
			type = "button",
			tooltiptext = "Returns to the Notifications Main Menu.",
			scripts = {
				OnClick = function() this.holder.place.column.menu:Hide(); Notifications:ShowGUI(); end,
			},
		},
		{
			title = "Close",
			type = "button",
			tooltiptext = "Closes this window.",
			scripts = {
				OnClick = function() this.holder.place.column.menu:Hide() end,
			},
		},
	},
}

function Notifications:ShowTimerGUI()
	if not NotificationsTimerMenuFrame then
		Notifications:CreateGUI(timerguitable)
	end
	NotificationsTimerMenuFrame:Show()
end
