Mercurial > wow > inventory
diff Frames.lua @ 145:6a52272a0e5a
Added a craft button to the queue window. This is still very experimental.
author | Zerotorescue |
---|---|
date | Thu, 20 Jan 2011 00:07:47 +0100 |
parents | 12a8ea5af671 |
children | 5d13830e8b0d |
line wrap: on
line diff
--- a/Frames.lua Wed Jan 19 23:21:16 2011 +0100 +++ b/Frames.lua Thu Jan 20 00:07:47 2011 +0100 @@ -400,6 +400,18 @@ btnCancel:SetScript("OnLeave", HideTooltip); frame.btnCancel = btnCancel; + + -- Craft + local btnCraft = CreateFrame("Button", "$parentCraft", frame, "UIPanelButtonTemplate"); + btnCraft:SetHeight(21); + --btnCraft:SetWidth(125); + btnCraft:SetPoint("TOPLEFT", btnProceed, "TOPRIGHT", 15, 0); + btnCraft:SetPoint("BOTTOMRIGHT", btnCancel, "BOTTOMLEFT", -15, 0); + btnCraft:SetScript("OnClick", function(this) this.OnClick(this); end); + btnCraft:SetScript("OnEnter", ShowTooltip); + btnCraft:SetScript("OnLeave", HideTooltip); + + frame.btnCraft = btnCraft; -- Because the scrolling table code-behind will change the scrolltable element's height, we can't rely on that. Make a dummy frame which we can measure local frmMeasureDummy = CreateFrame("Frame", nil, frame); @@ -620,7 +632,7 @@ InventoriumQueuer:Show(); end -function addon:SetQueueFrameSettings(title, description, proceed, cancel, headers, unqueueablesHeaders) +function addon:SetQueueFrameSettings(title, description, proceed, cancel, craft, headers, unqueueablesHeaders) local frame = InventoriumQueuer; frame.lblTitle:SetText(title); @@ -639,6 +651,11 @@ frame.btnCancel.tooltip = cancel.tooltip; frame.btnCancel.OnClick = cancel.onClick; + frame.btnCraft:SetText(craft.text); + frame.btnCraft.tooltipTitle = craft.tooltipTitle; + frame.btnCraft.tooltip = craft.tooltip; + frame.btnCraft.OnClick = craft.onClick; + frame.scrollTable:SetDisplayCols(headers); InventoriumQueuerUnqueueables.scrollTable:SetDisplayCols(unqueueablesHeaders);