Mercurial > wow > inventory
diff Frames.lua @ 144:12a8ea5af671
Added a ?remove? button to the crafting queue.
When removing an item from the queue or when it is finished casting (when using the Inventorium queue processer), items are moved to the ?unqueuables? window.
Fixed auction price checking.
Now resetting filters before scanning the tradeskill recipes.
author | Zerotorescue |
---|---|
date | Wed, 19 Jan 2011 23:21:16 +0100 |
parents | 5ed50feddeb0 |
children | 6a52272a0e5a |
line wrap: on
line diff
--- a/Frames.lua Tue Jan 18 23:48:16 2011 +0100 +++ b/Frames.lua Wed Jan 19 23:21:16 2011 +0100 @@ -417,11 +417,17 @@ scrollTable.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 35); -- When moving over a row, provide a tooltip for the item scrollTable:RegisterEvents({ - ["OnEnter"] = function(rowFrame, cellFrame, data, cols, row, realrow, column, scrollingTable, ...) + ["OnEnter"] = function(rowFrame, cellFrame, data, cols, row, realrow, column) if row and realrow then -- Data row - if data[realrow] and data[realrow].rowData and data[realrow].rowData.itemId then + if cols[column].name == "X" then + cellFrame.tooltipTitle = "Remove"; + cellFrame.tooltip = "Remove this item from the queue."; + cellFrame.tooltipLocation = "BOTTOM"; + + ShowTooltip(cellFrame); + elseif data[realrow] and data[realrow].rowData and data[realrow].rowData.itemId then GameTooltip:SetOwner(rowFrame, "ANCHOR_NONE"); GameTooltip:SetPoint("TOPLEFT", rowFrame, "BOTTOMLEFT"); GameTooltip:SetHyperlink(("item:%d"):format(data[realrow].rowData.itemId)); @@ -442,11 +448,22 @@ end end end, - ["OnLeave"] = function(rowFrame, cellFrame, data, cols, row, realrow, column, scrollingTable, ...) + ["OnLeave"] = function() HideTooltip(); end, - ["OnClick"] = function() end, + ["OnClick"] = function(rowFrame, cellFrame, data, cols, row, realrow, column) + if row and realrow then + -- Data row + + if cols[column].name == "X" then + cols[column].onClick(data[realrow].rowData); + + return true; -- cancel default event + end + end + end, }); + scrollTable:EnableSelection(true); frame.scrollTable = scrollTable;