Mercurial > wow > bloodhound2
changeset 8:75ca29b399e8 Release
Added in options in Interface->Addons to track Misc nodes.
author | only1yzerman |
---|---|
date | Mon, 24 Jun 2013 06:38:06 -0400 |
parents | 8e81e24efb3f |
children | 23b38b681d43 |
files | Bloodhound2.toc Config.lua LocalizeDefault.lua |
diffstat | 3 files changed, 47 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Bloodhound2.toc Mon Jun 24 06:09:23 2013 -0400 +++ b/Bloodhound2.toc Mon Jun 24 06:38:06 2013 -0400 @@ -2,7 +2,7 @@ ## Title: Bloodhound2 ## Author: Paul Louis ## Former Author: Bret Mulvey -## Version: 2.0.3 +## Version: 2.0.2 ## HerbDB: 5/8/2013 ## OreDB: 5/9/2013 ## Notes: An herb and ore gathering add-on with a focus on ease-of-use. @@ -25,3 +25,4 @@ MiscDatabase.lua ZoneDatum.lua Config.lua +
--- a/Config.lua Mon Jun 24 06:09:23 2013 -0400 +++ b/Config.lua Mon Jun 24 06:38:06 2013 -0400 @@ -8,8 +8,10 @@ Settings.MultiZoneMode = 0; Settings.HerbFilter = {}; Settings.OreFilter = {}; +Settings.MiscFilter = {}; Settings.ZoneFilter = {{}, {}, {}, {}, {}}; Settings.InspectionRadius = 60; + local function Title(text) local str = frame:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge"); str:SetPoint("TOPLEFT", element, "TOPLEFT", 16, -16); @@ -202,6 +204,22 @@ CheckBoxes(table, Settings.OreFilter); end +function AddMisc() + local table = {}; + + for h, v in pairs(Bloodhound2.ContinentMisc) do + local name = L[h]; + if not name then name="Misc "..h; end; + table[h] = name; + end + + if not Settings.MiscFilter then + Settings.MiscFilter = {}; + end + + CheckBoxes(table, Settings.MiscFilter); +end + local function CopyTable(table) local copy = {}; for k,v in pairs(table) do @@ -281,6 +299,19 @@ AddOre(); end +local miscFrame; + +local function RefreshMisc() + if (miscFrame) then miscFrame:Hide(); end; + miscFrame= CreateFrame("Frame", nil, Bloodhound2.miscPanel); + miscFrame:SetAllPoints(Bloodhound2.miscPanel); + frame = miscFrame; + element = frame; + Title(L["Bloodhound2 Options"]); + Heading(L["Misc"].." ("..ContinentName()..")"); + AddMisc(); +end + local function RestoreHerbDefaults() Settings.HerbFilter = {}; end @@ -289,6 +320,10 @@ Settings.OreFilter = {}; end +local function RestoreMiscDefaults() + Settings.MiscFilter = {}; +end + local function RestoreZoneDefaults() Settings.MultiZoneMode = 0; Settings.InspectionRadius = 60; @@ -321,3 +356,11 @@ Bloodhound2.orePanel.refresh = RefreshOre; InterfaceOptions_AddCategory(Bloodhound2.orePanel); +Bloodhound2.miscPanel = CreateFrame("FRAME", "Bloodhound2_Misc", Bloodhound2.Frame); +Bloodhound2.miscPanel.name = L["Misc"]; +Bloodhound2.miscPanel.parent = "Bloodhound2"; +Bloodhound2.miscPanel.default = RestoreMiscDefaults; +Bloodhound2.miscPanel.okay = function() end; +Bloodhound2.miscPanel.cancel = function() end; +Bloodhound2.miscPanel.refresh = RefreshMisc; +InterfaceOptions_AddCategory(Bloodhound2.miscPanel); \ No newline at end of file
--- a/LocalizeDefault.lua Mon Jun 24 06:09:23 2013 -0400 +++ b/LocalizeDefault.lua Mon Jun 24 06:38:06 2013 -0400 @@ -145,4 +145,6 @@ L[209329] = "Rich Kyparite Deposit"; L[215413] = "Ghost Iron Deposit"; +L["Misc"] = "Miscellaneous"; +L["Find Misc"] = "Track Miscellaneous Nodes"; L[218593] = "Trove of the Thunder King";