Mercurial > wow > inventory
diff Modules/Config.lua @ 156:314943963155
Added initial guild bank data excluding (for addons like DataStore). This setting is currently not stored on relog.
author | Zerotorescue |
---|---|
date | Sat, 22 Jan 2011 02:57:08 +0100 |
parents | 5081056cade1 |
children | e136c99fe5bb |
line wrap: on
line diff
--- a/Modules/Config.lua Sat Jan 22 01:46:17 2011 +0100 +++ b/Modules/Config.lua Sat Jan 22 02:57:08 2011 +0100 @@ -1782,8 +1782,65 @@ }, }, }, + guildSelection = { + order = 15, + type = "group", + inline = true, + name = "Filter item count data", + args = { + description = { + order = 0, + type = "description", + name = "Change which data sources are used in the item counts.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + header = { + order = 5, + type = "header", + name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + guilds = { + order = 20, + type = "multiselect", + width = "double", + name = "Include guild bank data", + desc = "Select which guild data should be included in the item counts.", + values = function() + local temp = {}; + + local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); + + if currentAddon.GetGuildNames then + local guilds = currentAddon.GetGuildNames(); + + if guilds and type(guilds) == "table" then + for guildName, state in pairs(guilds) do + temp[guildName] = guildName; + end + end + end + + return temp; + end, + get = function(i, v) + local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); + + return currentAddon.GetGuildNames and currentAddon.GetGuildNames()[v]; + end, + set = function(i, v, e) + local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); + + if currentAddon.SetGuildState then + currentAddon:SetGuildState(v, e); + end + end, -- can't be nil or the defaults will be used + dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. + }, + }, + }, export = { - order = 30, + order = 20, type = "group", inline = true, name = "Export groups",