diff Summary.lua @ 36:58fb38f0b447

The list of possible commands when you write /im without any arguement will now include commands inserted by modules with their own descriptions. Clicking a command in this list will now execute it. The slash command handler function is now a global so you can invoke these through other methods. Added an optional event function to registering auction pricing addons, when defined this will be executed when the pricing addon gets selected. Removed the unused ?Override local item data? option. Added ?AuctionProfitMaster? and ?ZeroAuctions? pricing support. The pricing info displayed in the summary window will be used for this. Trying to queue without any items in the summary should no longer give an error.
author Zerotorescue
date Sat, 20 Nov 2010 17:24:16 +0100
parents e732843b16d2
children 9607b3251655
line wrap: on
line diff
--- a/Summary.lua	Wed Nov 03 19:38:53 2010 +0100
+++ b/Summary.lua	Sat Nov 20 17:24:16 2010 +0100
@@ -17,7 +17,7 @@
 	addon:RegisterSlash(function()
 		mod:BuildMain();
 		mod:Build();
-	end, "s", "sum", "summary");
+	end, { "s", "sum", "summary" }, "|Hfunction:InventoriumCommandHandler:summary|h|cff00fff7/im summary|r|h (or /im s) - Show the summary window containing an overview of all items within the groups tracked at this current character.");
 	addon:RegisterSlash(function()
 		if mod.frame then
 			mod.frame:SetWidth(650);
@@ -25,7 +25,7 @@
 			
 			print("Resetting width and height of the summary frame.");
 		end
-	end, "r", "reset");
+	end, { "r", "reset" }, "|Hfunction:InventoriumCommandHandler:reset|h|cff00fff7/im reset|r|h (or /im r) - Reset the size of the summary frame.");
 end
 
 local function ShowTooltip(self)
@@ -326,6 +326,19 @@
 			
 			iGroup:AddChild(lblQuantity);
 			
+			-- Local quantity
+			--[[local lblLocal = AceGUI:Create("InteractiveLabel");
+			lblLocal:SetText("|cfffed000Loc.|r");
+			lblLocal:SetFontObject(GameFontHighlight);
+			lblLocal:SetRelativeWidth(.099);
+			lblLocal:SetCallback("OnClick", function() ReSort("current"); end);
+			lblLocal:SetCallback("OnEnter", ShowTooltip);
+			lblLocal:SetCallback("OnLeave", HideTooltip);
+			lblLocal.frame.tooltipTitle = "Local stock";
+			lblLocal.frame.tooltip = "Sort on the amount of items currently in local stock.";
+			
+			iGroup:AddChild(lblLocal);]]
+			
 			-- Required stock
 			local lblMinimumStock = AceGUI:Create("InteractiveLabel");
 			lblMinimumStock:SetText("|cfffed000Min.|r");
@@ -368,6 +381,7 @@
 						value = ((priceThreshold == 0 and not alwaysGetAuctionValue) and -4) or -3,-- if (no price threshold is set for this item and you don't want to always get auction value), then don't look it up either --addon:GetAuctionValue(itemLink),
 						rarity = itemRarity or 1,
 						count = -3,--addon:GetItemCount(itemId, groupName),
+						--localCount = -3,
 						set = {},
 					});
 					CACHE_ITEMS_TOTAL = CACHE_ITEMS_TOTAL + 1;
@@ -454,6 +468,13 @@
 					
 					iGroup:AddChild(lblQuantity);
 					
+					-- Local quantity
+					--[[local lblLocal = AceGUI:Create("Label");
+					lblLocal:SetText(self:DisplayItemCount(item.count, minimumStock));
+					lblLocal:SetRelativeWidth(.099);
+					
+					iGroup:AddChild(lblLocal);]]
+					
 					-- Required stock
 					local lblMinimumStock = AceGUI:Create("Label");
 					lblMinimumStock:SetText(minimumStock);