diff CombatLog.lua @ 124:e31b02b24488

Updated for 8.0 pre-patch and BfA.
author yellowfive
date Tue, 17 Jul 2018 09:57:39 -0700
parents f1da233629be
children a0894ffebd15
line wrap: on
line diff
--- a/CombatLog.lua	Mon Feb 12 19:34:09 2018 -0800
+++ b/CombatLog.lua	Tue Jul 17 09:57:39 2018 -0700
@@ -23,36 +23,36 @@
 	_autoChecks[instanceId] = {}
 	
 	local lbl = AceGUI:Create("AmrUiLabel")
+	container:AddChild(lbl)
 	lbl:SetWidth(200)
 	lbl:SetText(L.InstanceNames[instanceId])
 	lbl:SetFont(Amr.CreateFont("Regular", 20, Amr.Colors.White))
-	container:AddChild(lbl)
 	
 	local line = AceGUI:Create("AmrUiPanel")
 	line:SetHeight(1)
 	line:SetBackgroundColor(Amr.Colors.White)
+	container:AddChild(line)
 	line:SetPoint("TOPLEFT", lbl.frame, "BOTTOMLEFT", 1, -7)
 	line:SetPoint("TOPRIGHT", lbl.frame, "BOTTOMRIGHT", 0, -7)
-	container:AddChild(line)
 	
 	local chkMythic = createDifficultyCheckBox(instanceId, Amr.Difficulties.Mythic)
+	container:AddChild(chkMythic)
 	chkMythic:SetPoint("TOPLEFT", line.frame, "BOTTOMLEFT", 0, -8)
-	container:AddChild(chkMythic)
 	
 	local chkNormal = createDifficultyCheckBox(instanceId, Amr.Difficulties.Normal)
+	container:AddChild(chkNormal)
 	chkNormal:SetPoint("TOPLEFT", line.frame, "BOTTOMLEFT", 0, -30)
-	container:AddChild(chkNormal)
 	
 	-- find the widest of mythic/normal
 	local w = math.max(chkMythic:GetWidth(), chkNormal:GetWidth())
 	
 	local chkHeroic = createDifficultyCheckBox(instanceId, Amr.Difficulties.Heroic)
+	container:AddChild(chkHeroic)
 	chkHeroic:SetPoint("TOPLEFT", line.frame, "BOTTOMLEFT", w + 20, -8)
-	container:AddChild(chkHeroic)
 	
 	local chkLfr = createDifficultyCheckBox(instanceId, Amr.Difficulties.Lfr)
+	container:AddChild(chkLfr)
 	chkLfr:SetPoint("TOPLEFT", line.frame, "BOTTOMLEFT", w + 20, -30)
-	container:AddChild(chkLfr)
 	
 	return lbl, chkNormal
 end
@@ -67,17 +67,17 @@
 	_btnToggle:SetFont(Amr.CreateFont("Bold", 16, Amr.Colors.White))
 	_btnToggle:SetWidth(200)
 	_btnToggle:SetHeight(26)
-	_btnToggle:SetPoint("TOPLEFT", container.content, "TOPLEFT", 0, -40)
 	_btnToggle:SetCallback("OnClick", function() Amr:ToggleLogging() end)
 	container:AddChild(_btnToggle)
+	_btnToggle:SetPoint("TOPLEFT", container.content, "TOPLEFT", 0, -40)
 	
 	_lblLogging = AceGUI:Create("AmrUiLabel")
+	container:AddChild(_lblLogging)
 	_lblLogging:SetText(L.LogNote)
 	_lblLogging:SetWidth(200)	
 	_lblLogging:SetFont(Amr.CreateFont("Italic", 14, Amr.Colors.BrightGreen))
 	_lblLogging:SetJustifyH("MIDDLE")
 	_lblLogging:SetPoint("TOP", _btnToggle.frame, "BOTTOM", 0, -5)
-	container:AddChild(_lblLogging)
 	
 	local btnReload = AceGUI:Create("AmrUiButton")
 	btnReload:SetText(L.LogButtonReloadText)
@@ -85,9 +85,9 @@
 	btnReload:SetFont(Amr.CreateFont("Bold", 16, Amr.Colors.White))
 	btnReload:SetWidth(200)
 	btnReload:SetHeight(26)
-	btnReload:SetPoint("TOPLEFT", _btnToggle.frame, "TOPRIGHT", 40, 0)
 	btnReload:SetCallback("OnClick", ReloadUI)
 	container:AddChild(btnReload)
+	btnReload:SetPoint("TOPLEFT", _btnToggle.frame, "TOPRIGHT", 40, 0)
 	
 	--[[
 	local lbl = AceGUI:Create("AmrUiLabel")
@@ -160,17 +160,17 @@
 	
 	-- auto-logging controls
 	local lbl = AceGUI:Create("AmrUiLabel")
+	container:AddChild(lbl)
 	lbl:SetWidth(600)
 	lbl:SetText(L.LogAutoTitle)
 	lbl:SetFont(Amr.CreateFont("Bold", 24, Amr.Colors.TextHeaderActive))
 	lbl:SetPoint("TOPLEFT", _btnToggle.frame, "BOTTOMLEFT", 0, -40)
-	container:AddChild(lbl)
 	
 	_chkAutoAll = AceGUI:Create("AmrUiCheckBox")
 	_chkAutoAll:SetText(L.LogAutoAllText)
-	_chkAutoAll:SetPoint("TOPLEFT", lbl.frame, "BOTTOMLEFT", 1, -15)
 	_chkAutoAll:SetCallback("OnClick", function(widget) Amr:ToggleAllAutoLog() end)
 	container:AddChild(_chkAutoAll)
+	_chkAutoAll:SetPoint("TOPLEFT", lbl.frame, "BOTTOMLEFT", 1, -15)
 	
 	_autoChecks = {}
 	
@@ -190,8 +190,9 @@
 		table.insert(autoLbls, autoLbl)
 		table.insert(autoChks, autoChk)
 	end
-	autoSections = nil
-	
+	autoLbls = nil
+	autoChks = nil
+
 	-- instructions
 	--[[
 	lbl = AceGUI:Create("AmrUiLabel")