Mercurial > wow > inventory
comparison Summary.lua @ 27:95c813292a88
Fixed the ?Hide when below threshold? option.
author | Zerotorescue |
---|---|
date | Thu, 28 Oct 2010 19:31:58 +0200 |
parents | 7d7aaa3fbe94 |
children | e732843b16d2 |
comparison
equal
deleted
inserted
replaced
26:26aa2e415c00 | 27:95c813292a88 |
---|---|
276 | 276 |
277 -- Get group settings | 277 -- Get group settings |
278 local minimumStock = (values.minimumStock or (values.minimumStock == nil and addon.db.global.defaults.minimumStock)); | 278 local minimumStock = (values.minimumStock or (values.minimumStock == nil and addon.db.global.defaults.minimumStock)); |
279 local showWhenBelow = (values.summaryThresholdShow or (values.summaryThresholdShow == nil and addon.db.global.defaults.summaryThresholdShow)); | 279 local showWhenBelow = (values.summaryThresholdShow or (values.summaryThresholdShow == nil and addon.db.global.defaults.summaryThresholdShow)); |
280 local priceThreshold = (values.priceThreshold or (values.priceThreshold == nil and addon.db.global.defaults.priceThreshold)); | 280 local priceThreshold = (values.priceThreshold or (values.priceThreshold == nil and addon.db.global.defaults.priceThreshold)); |
281 local hideWhenBelowPriceThreshold = (values.hideFromSummaryWhenBelowPriceThreshold or (values.hideFromSummaryWhenBelowPriceThreshold == nil and addon.db.global.defaults.hideFromSummaryWhenBelowPriceThreshold)); | 281 local hideWhenBelowPriceThreshold = (values.summaryHidePriceThreshold or (values.summaryHidePriceThreshold == nil and addon.db.global.defaults.summaryHidePriceThreshold)); |
282 local alwaysGetAuctionValue = (values.alwaysGetAuctionValue or (values.alwaysGetAuctionValue == nil and addon.db.global.defaults.alwaysGetAuctionValue)); | 282 local alwaysGetAuctionValue = (values.alwaysGetAuctionValue or (values.alwaysGetAuctionValue == nil and addon.db.global.defaults.alwaysGetAuctionValue)); |
283 | 283 |
284 -- Make group container | 284 -- Make group container |
285 local iGroup = AceGUI:Create("InlineGroupWithButton"); | 285 local iGroup = AceGUI:Create("InlineGroupWithButton"); |
286 iGroup:PauseLayout(); | 286 iGroup:PauseLayout(); |
420 | 420 |
421 | 421 |
422 | 422 |
423 -- Show itemslist | 423 -- Show itemslist |
424 for i, item in pairs(itemsCache[groupName]) do | 424 for i, item in pairs(itemsCache[groupName]) do |
425 if ( item.count / minimumStock ) < showWhenBelow and not (hideWhenBelowPriceThreshold and item.value < priceThreshold) then | 425 if ( item.count / minimumStock ) < showWhenBelow and not (hideWhenBelowPriceThreshold and item.value < priceThreshold and item.value >= 0) then |
426 local btnItemLink = AceGUI:Create("ItemLinkButton"); | 426 local btnItemLink = AceGUI:Create("ItemLinkButton"); |
427 btnItemLink:SetUserData("exec", function(_, itemId, _, buttonName) | 427 btnItemLink:SetUserData("exec", function(_, itemId, _, buttonName) |
428 local itemName, itemLink = GetItemInfo(itemId); | 428 local itemName, itemLink = GetItemInfo(itemId); |
429 | 429 |
430 if buttonName == "LeftButton" and IsShiftKeyDown() and itemLink then | 430 if buttonName == "LeftButton" and IsShiftKeyDown() and itemLink then |