Mercurial > wow > askmrrobot
comparison ui/CombatLogTab.lua @ 51:6f1bb8fcf64d v18
AskMrRobot.toc
- Added line for new SettingsTab file
AskMrRobotUi.lua
- Added code for new Settings menu
amr-constants.lua
- Added instance IDs for all WoD 6.0 5-mans and Raids.
- Removed legacy SoO IDs.
config.lua
- Removed "Interface/Addons" options area,
migrated all settings to main addon window.
localization/localization.en.lua
- Added new strings for new Settings tab and new Raid auto-logging
ui/CombatLogTab.lua
- Removed legacy SoO code
- Added auto-logging settings for Highmaul and Blackrock Foundry.
ui/SettingsTab.lua
- new main window tab for Minimap and Auction House settings options
author | TuhMuffinMan <TuhMuffinMan> |
---|---|
date | Fri, 28 Nov 2014 13:09:52 -0600 |
parents | 90175bdc50e6 |
children | be5dc6c02f77 |
comparison
equal
deleted
inserted
replaced
50:af0dc99cbedb | 51:6f1bb8fcf64d |
---|---|
80 | 80 |
81 text = content:CreateFontString(nil, "ARTWORK", "GameFontWhite") | 81 text = content:CreateFontString(nil, "ARTWORK", "GameFontWhite") |
82 text:SetPoint("LEFT", btn, "RIGHT", 10, 0) | 82 text:SetPoint("LEFT", btn, "RIGHT", 10, 0) |
83 tab.loggingStatus = text; | 83 tab.loggingStatus = text; |
84 | 84 |
85 local autoChk = newCheckbox(content, | 85 local hmAutoChk = newCheckbox(content, |
86 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_SOO_LABEL, | 86 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_HM_LABEL, |
87 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_SOO_TOOLTIP_TITLE, | 87 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_HM_TOOLTIP_TITLE, |
88 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_SOO_DESCRIPTION, | 88 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_HM_DESCRIPTION, |
89 function(self, value) | 89 function(self, value) |
90 if value then | 90 if value then |
91 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] = "enabled" | 91 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] = "enabled" |
92 else | 92 else |
93 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] = "disabled" | 93 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] = "disabled" |
94 end | 94 end |
95 | 95 |
96 AmrDb.LogData._lastZone = nil | 96 AmrDb.LogData._lastZone = nil |
97 AmrDb.LogData._lastDiff = nil | 97 AmrDb.LogData._lastDiff = nil |
98 tab:UpdateAutoLogging() | 98 tab:UpdateAutoLogging() |
99 end | 99 end |
100 ) | 100 ) |
101 autoChk:SetChecked(AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] == "enabled") | 101 hmAutoChk:SetChecked(AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] == "enabled") |
102 autoChk:SetPoint("TOPLEFT", btn, "BOTTOMLEFT", 0, -10) | 102 hmAutoChk:SetPoint("TOPLEFT", btn, "BOTTOMLEFT", 0, -10) |
103 autoChk:SetHeight(30) | 103 hmAutoChk:SetHeight(30) |
104 | 104 |
105 | 105 local brfAutoChk = newCheckbox(content, |
106 local text = CreateText(content, "GameFontNormalLarge", autoChk, 0, -20, L.AMR_COMBATLOGTAB_INFIGHT) | 106 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_BRF_LABEL, |
107 | 107 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_BRF_TOOLTIP_TITLE, |
108 btn = CreateFrame("Button", "AmrCombatLogWipe", autoChk, "UIPanelButtonTemplate") | 108 L.AMR_COMBATLOGTAB_CHECKBOX_AUTOLOG_BRF_DESCRIPTION, |
109 function(self, value) | |
110 if value then | |
111 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] = "enabled" | |
112 else | |
113 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] = "disabled" | |
114 end | |
115 | |
116 AmrDb.LogData._lastZone = nil | |
117 AmrDb.LogData._lastDiff = nil | |
118 tab:UpdateAutoLogging() | |
119 end | |
120 ) | |
121 brfAutoChk:SetChecked(AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] == "enabled") | |
122 brfAutoChk:SetPoint("TOPLEFT", hmAutoChk, "BOTTOMLEFT", 0, -10) | |
123 brfAutoChk:SetHeight(30) | |
124 | |
125 local text = CreateText(content, "GameFontNormalLarge", brfAutoChk, 0, -20, L.AMR_COMBATLOGTAB_INFIGHT) | |
126 | |
127 btn = CreateFrame("Button", "AmrCombatLogWipe", brfAutoChk, "UIPanelButtonTemplate") | |
109 btn:SetPoint("TOPLEFT", text, "BOTTOMLEFT", 0, -10) | 128 btn:SetPoint("TOPLEFT", text, "BOTTOMLEFT", 0, -10) |
110 btn:SetText("Wipe") | 129 btn:SetText("Wipe") |
111 btn:SetWidth(70) | 130 btn:SetWidth(70) |
112 btn:SetHeight(30) | 131 btn:SetHeight(30) |
113 btn:SetScript("OnClick", function() | 132 btn:SetScript("OnClick", function() |
180 SetCVar("advancedCombatLogging", 1) | 199 SetCVar("advancedCombatLogging", 1) |
181 LoggingCombat(true) | 200 LoggingCombat(true) |
182 end | 201 end |
183 | 202 |
184 -- if auto-logging is enabled, do a check when the addon is loaded to make sure that state is set correctly | 203 -- if auto-logging is enabled, do a check when the addon is loaded to make sure that state is set correctly |
185 if AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] == "enabled" then | 204 if AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] == "enabled" or AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] == "enabled" then |
186 tab:UpdateAutoLogging() | 205 tab:UpdateAutoLogging() |
187 end | 206 end |
188 | 207 |
189 tab:SetScript("OnShow", function() | 208 tab:SetScript("OnShow", function() |
190 tab:Update() | 209 tab:Update() |
362 end | 381 end |
363 | 382 |
364 AmrDb.LogData._lastZone = zone | 383 AmrDb.LogData._lastZone = zone |
365 AmrDb.LogData._lastDiff = difficultyIndex | 384 AmrDb.LogData._lastDiff = difficultyIndex |
366 | 385 |
367 if AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] == "enabled" then | 386 if AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] == "enabled" or AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] == "enabled" then |
368 if tonumber(instanceMapID) == AskMrRobot.instanceIds.SiegeOfOrgrimmar then | 387 if tonumber(instanceMapID) == AskMrRobot.instanceIds.Highmaul or tonumber(instanceMapID) == AskMrRobot.instanceIds.BlackrockFoundry then |
369 -- if in SoO, make sure logging is on | 388 -- if in SoO, make sure logging is on |
370 if not AskMrRobot.CombatLogTab.IsLogging() then | 389 if not AskMrRobot.CombatLogTab.IsLogging() then |
371 self:StartLogging() | 390 self:StartLogging() |
372 end | 391 end |
373 else | 392 else |
417 | 436 |
418 -- initialize the AmrDb.LogData variable | 437 -- initialize the AmrDb.LogData variable |
419 function AskMrRobot.CombatLogTab.InitializeVariable() | 438 function AskMrRobot.CombatLogTab.InitializeVariable() |
420 if not AmrDb.LogData then AmrDb.LogData = {} end | 439 if not AmrDb.LogData then AmrDb.LogData = {} end |
421 if not AmrDb.LogData._autoLog then AmrDb.LogData._autoLog = {} end | 440 if not AmrDb.LogData._autoLog then AmrDb.LogData._autoLog = {} end |
422 if not AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] then | 441 if not AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] then |
423 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.SiegeOfOrgrimmar] = "disabled" | 442 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.Highmaul] = "disabled" |
424 end | 443 end |
444 if not AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] then | |
445 AmrDb.LogData._autoLog[AskMrRobot.instanceIds.BlackrockFoundry] = "disabled" | |
446 end | |
425 AmrDb.LogData._wipes = AmrDb.LogData._wipes or {} | 447 AmrDb.LogData._wipes = AmrDb.LogData._wipes or {} |
426 end | 448 end |
427 | 449 |
428 local function GetPlayerExtraData(data, unitId, petId) | 450 local function GetPlayerExtraData(data, unitId, petId) |
429 | 451 |