comparison Modules/MinimapIcon.lua @ 208:8cecfea6a254

Added CTRL-leftclick to initiate a queue. Making sure the minimap icon isn?t registered prior to registering it.
author Zerotorescue
date Sat, 05 Feb 2011 20:02:45 +0100
parents 585cfb690080
children 1959e2b3dfe1
comparison
equal deleted inserted replaced
207:5d6b3d116b80 208:8cecfea6a254
15 ["OnClick"] = function(frame, button) 15 ["OnClick"] = function(frame, button)
16 if button == "RightButton" then 16 if button == "RightButton" then
17 -- Open up the config 17 -- Open up the config
18 InventoriumCommandHandler("config"); 18 InventoriumCommandHandler("config");
19 elseif button == "LeftButton" then 19 elseif button == "LeftButton" then
20 -- Open the summary 20 if IsControlKeyDown() then
21 InventoriumCommandHandler("summary"); 21 -- Queue
22 InventoriumCommandHandler("queue");
23 else
24 -- Open the summary
25 InventoriumCommandHandler("summary");
26 end
22 elseif button == "MiddleButton" then 27 elseif button == "MiddleButton" then
23 -- Check stock and provide the alert if needed 28 -- Check stock and provide the alert if needed
24 InventoriumCommandHandler("alert"); 29 InventoriumCommandHandler("alert");
25 end 30 end
26 end, 31 end,
28 tooltip:AddLine("Inventorium"); 33 tooltip:AddLine("Inventorium");
29 tooltip:AddLine(" "); 34 tooltip:AddLine(" ");
30 tooltip:AddLine("|cfffed000Left-click|r to open the summary window.", 0, 1, 0); 35 tooltip:AddLine("|cfffed000Left-click|r to open the summary window.", 0, 1, 0);
31 tooltip:AddLine("|cfffed000Middle-click|r to generate a stock alert.", 0, 1, 0); 36 tooltip:AddLine("|cfffed000Middle-click|r to generate a stock alert.", 0, 1, 0);
32 tooltip:AddLine("|cfffed000Right-click|r to open the config window.", 0, 1, 0); 37 tooltip:AddLine("|cfffed000Right-click|r to open the config window.", 0, 1, 0);
38 tooltip:AddLine("|cfffed000Control left-click|r to try to queue tracked items.", 0, 1, 0);
33 end, 39 end,
34 }); 40 });
35 41
36 local icon = LibStub("LibDBIcon-1.0"); 42 local icon = LibStub("LibDBIcon-1.0");
37 if icon then 43 if icon and not icon:IsRegistered("Inventorium") then
38 icon:Register("Inventorium", dataobject); 44 icon:Register("Inventorium", dataobject);
39 end 45 end
40 end 46 end