Mercurial > wow > inventory
diff Modules/Config.lua @ 106:d3fbb5676a5e
Added tooltips to the item refill window headers.
Now color coding the availibility of items at the item refill window.
Added a hide help text option (which is off by default).
Renamed all premade groups to a new naming pattern; ?Profession - Category - Detail?, e.g. ?Inscription - Glyphs by class - Death Knight?. To continue getting notified about updates to a selected premade group, you must re-add them.
Repositioned elements of the item refill frame to fit better.
No longer using colorsargs to remember the index of a queued move, but instead providing a reference to the move itself in the new ?rowData? property of each row.
Added tooltips to the headers of the sort table.
Merged missing and available columns together (showing available / missing) and sorting on available now sorts on percentage of how many of the missing items are available.
Moving and available columns are now aligned to the right.
Added an ?extra? config group which contains the additional (but completely optional) settings. Moved color codes adjustments, forget character, auto refill skip confirm and hide help info options to this group.
author | Zerotorescue |
---|---|
date | Wed, 12 Jan 2011 19:58:39 +0100 |
parents | 6ae44d372360 |
children | a27948591159 |
line wrap: on
line diff
--- a/Modules/Config.lua Wed Jan 12 14:15:50 2011 +0100 +++ b/Modules/Config.lua Wed Jan 12 19:58:39 2011 +0100 @@ -282,7 +282,10 @@ name = function(info) local groupName = groupIdToName[info[2]]; - local t = "Here you can set general settings for the currently selected group. If you do not wish to override a setting, the default setting specified in the general group will be used.\n\n"; + local t = ""; + if not addon.db.profile.defaults.hideHelp then + t = "Here you can set general settings for the currently selected group. If you do not wish to override a setting, the default setting specified in the general group will be used.\n\n"; + end local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); local preferedAddon = addon:GetOptionByKey(groupName, "itemCountAddon"); @@ -312,6 +315,7 @@ order = 5, type = "header", name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, overrideAuctionPricingAddon = { order = 9, @@ -473,11 +477,13 @@ order = 0, type = "description", name = "Here you can specify the minimum amount of items you wish to keep in stock and related settings for the currently selected group. Please note the values entered here do not affect the queued quantities, you must set settings for that in the area below.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, header = { order = 5, type = "header", name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, overrideMinLocalStock = { @@ -631,11 +637,13 @@ return r; end, + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, header = { order = 5, type = "header", name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, overrideRestockTarget = { order = 9, @@ -860,6 +868,7 @@ order = 10, type = "description", name = "You can add a single item to this group at a time by pasting the item-id or an item-link in the field to the left or you can also import multiple items at once by pasting exported item data in the field to the right. Scroll further down to add items based on your inventory contents.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, itemLink = { order = 20, @@ -943,6 +952,7 @@ importPremadeData = { order = 40, type = "select", + width = "double", name = "Import premade data", desc = "Import item data from a premade item-group. Any items already grouped will be skipped.", values = function() @@ -1000,6 +1010,7 @@ order = 10, type = "description", name = "Click the items you wish to add to this group or add multiple of these items at once by providing a name filter in the field below.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, massAdd = { order = 20, @@ -1092,13 +1103,14 @@ order = 10, type = "group", inline = true, - name = "Help", + name = "Remove items", hidden = false, args = { help = { order = 10, type = "description", name = "Click the items you wish to remove from this group.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, massRemove = { order = 20, @@ -1136,6 +1148,7 @@ premadeGroups = { order = 30, type = "select", + width = "double", name = "Imported premade groups", desc = "This is a list of all premade groups that were imported into this group. You will be notified when any of these premade groups have changed and you will be able to import these changes.\n\nSelect a group to stop reminding you of changes to the premade group (the item list will be unaffected). Doing so will require you to manually update this when new items are added to the game.", values = function(info) @@ -1306,6 +1319,9 @@ options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(addon.db, true); options.args.profiles.order = 200; + -- Extra + self:FillExtraOptions(); + -- Groups self:MakeGroupOptions(); @@ -1330,7 +1346,10 @@ order = 0, type = "description", name = function() - local t = "Here you can set general settings. The settings entered here will be used when you choose not to override the settings within an individual group.\n\n"; + local t = ""; + if not addon.db.profile.defaults.hideHelp then + t = "Here you can set general settings. The settings entered here will be used when you choose not to override the settings within an individual group.\n\n"; + end local currentAddon, selectedAddonName = addon:GetItemCountAddon(); local preferedAddon = addon.db.profile.defaults.itemCountAddon; @@ -1452,11 +1471,13 @@ order = 0, type = "description", name = "Here you can specify the default minimum amount of items you wish to keep in stock and related settings. The settings entered here will be used when you choose not to override the settings within an individual group.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, header = { order = 5, type = "header", name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, minLocalStock = { order = 10, @@ -1486,14 +1507,6 @@ get = function() return addon.db.profile.defaults.autoRefill; end, set = function(i, v) addon.db.profile.defaults.autoRefill = v; end, }, - autoRefillSkipConfirm = { - order = 13, - type = "toggle", - name = "Skip confirmation", - desc = "Automatically start moving items from the (guild) bank without showing the confirmation window.\n\n|cfffed000This option can not be overridden.|r", - get = function() return addon.db.profile.defaults.autoRefillSkipConfirm; end, - set = function(i, v) addon.db.profile.defaults.autoRefillSkipConfirm = v; end, - }, minGlobalStock = { order = 20, type = "range", @@ -1566,11 +1579,13 @@ return r; end, + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, header = { order = 5, type = "header", name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, }, restockTarget = { order = 10, @@ -1635,92 +1650,46 @@ }, }, }, - colorCodes = { - order = 30, + }, + }; +end + +function mod:FillExtraOptions() + options.args.extra = { + order = 300, + type = "group", + name = "Extra", + desc = "Change additional (but completely optional) settings.", + args = { + misc = { + order = 10, type = "group", inline = true, - name = "Color codes", + name = "Miscellaneous", args = { - description = { - order = 0, - type = "description", - name = "Change the color code thresholds based on the current stock remaining of the required minimum stock.", + hideHelp = { + order = 10, + type = "toggle", + width = "full", + name = "Hide any help tooltips, descriptions and the help config category", + desc = "Hide any optional help tooltips, descriptions and the help config category.\n\nPlease note some tooltips may not disappear until next login.", + get = function() return addon.db.profile.defaults.hideHelp; end, + set = function(i, v) addon.db.profile.defaults.hideHelp = v; end, }, - header = { - order = 5, - type = "header", - name = "", - }, - green = { - order = 10, - type = "range", - min = 0, - max = 1, - step = 0.01, - isPercent = true, - name = "|cff00ff00Green|r", - desc = "Show quantity in green when at least this much of the minimum stock is available.\n\n|cfffed000This option can not be overridden.|r", - get = function() return addon.db.profile.defaults.colors.green; end, - set = function(i, v) addon.db.profile.defaults.colors.green = v; end, - }, - yellow = { + autoRefillSkipConfirm = { order = 20, - type = "range", - min = 0, - max = 1, - step = 0.01, - isPercent = true, - name = "|cffffff00Yellow|r", - desc = "Show quantity in yellow when at least this much of the minimum stock is available.\n\n|cfffed000This option can not be overridden.|r", - get = function() return addon.db.profile.defaults.colors.yellow; end, - set = function(i, v) addon.db.profile.defaults.colors.yellow = v; end, - }, - orange = { - order = 30, - type = "range", - min = 0, - max = 1, - step = 0.01, - isPercent = true, - name = "|cffff9933Orange|r", - desc = "Show quantity in orange when at least this much of the minimum stock is available.\n\n|cfffed000This option can not be overridden.|r", - get = function() return addon.db.profile.defaults.colors.orange; end, - set = function(i, v) addon.db.profile.defaults.colors.orange = v; end, - }, - red = { - order = 40, - type = "range", - min = 0, - max = 1, - step = 0.01, - isPercent = true, - name = "|cffff0000Red|r", - desc = "Show quantity in red when at least this much of the minimum stock is available.\n\n|cfffed000This option can not be overridden.|r", - get = function() return addon.db.profile.defaults.colors.red; end, - set = function(i, v) addon.db.profile.defaults.colors.red = v; end, - }, - }, - }, - extra = { - order = 40, - type = "group", - inline = true, - name = "Extra", - args = { - description = { - order = 0, - type = "description", - name = "Additional optional settings.", - }, - header = { - order = 5, - type = "header", - name = "", + type = "toggle", + width = "full", + name = "Skip the confirmation window for (guild) bank refilling", + desc = "Automatically start moving items from the (guild) bank without showing the confirmation window.", + get = function() return addon.db.profile.defaults.autoRefillSkipConfirm; end, + set = function(i, v) addon.db.profile.defaults.autoRefillSkipConfirm = v; end, }, removeCharacter = { - order = 40, + order = 30, type = "select", - name = "Forget character", + width = "double", + name = "Remove a character from Inventorium's memory", desc = "Select a character to remove all traces of it from Inventorium's memory.\n\nYour current character can not be removed, you must login to a different character to do so.", values = function() local temp = {}; @@ -1750,6 +1719,74 @@ }, }, }, + colorCodes = { + order = 30, + type = "group", + inline = true, + name = "Color codes", + args = { + description = { + order = 0, + type = "description", + name = "Change the color code thresholds based on the current stock remaining of the required minimum stock.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + header = { + order = 5, + type = "header", + name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + green = { + order = 10, + type = "range", + min = 0, + max = 1, + step = 0.01, + isPercent = true, + name = "|cff00ff00Green|r", + desc = "Show quantity in green when at least this much of the minimum stock is available.", + get = function() return addon.db.profile.defaults.colors.green; end, + set = function(i, v) addon.db.profile.defaults.colors.green = v; end, + }, + yellow = { + order = 20, + type = "range", + min = 0, + max = 1, + step = 0.01, + isPercent = true, + name = "|cffffff00Yellow|r", + desc = "Show quantity in yellow when at least this much of the minimum stock is available.", + get = function() return addon.db.profile.defaults.colors.yellow; end, + set = function(i, v) addon.db.profile.defaults.colors.yellow = v; end, + }, + orange = { + order = 30, + type = "range", + min = 0, + max = 1, + step = 0.01, + isPercent = true, + name = "|cffff9933Orange|r", + desc = "Show quantity in orange when at least this much of the minimum stock is available.", + get = function() return addon.db.profile.defaults.colors.orange; end, + set = function(i, v) addon.db.profile.defaults.colors.orange = v; end, + }, + red = { + order = 40, + type = "range", + min = 0, + max = 1, + step = 0.01, + isPercent = true, + name = "|cffff0000Red|r", + desc = "Show quantity in red when at least this much of the minimum stock is available.", + get = function() return addon.db.profile.defaults.colors.red; end, + set = function(i, v) addon.db.profile.defaults.colors.red = v; end, + }, + }, + }, }, }; end @@ -1758,6 +1795,7 @@ options.args.help = { order = 150, type = "group", + hidden = function() return addon.db.profile.defaults.hideHelp; end, childGroups = "tab", name = "Help", desc = "Useful information for if you're unfamiliar with a part of the addon.",