Mercurial > wow > buffalo2
diff ObjectiveTracker/ObjectiveFrame.lua @ 24:66b927b46776
Refine the XML data logic, and sort out some EnableMouse inconsistencies.
author | Nenue |
---|---|
date | Mon, 11 Apr 2016 09:07:40 -0400 |
parents | e837384ac363 |
children | 4b3da1b221de |
line wrap: on
line diff
--- a/ObjectiveTracker/ObjectiveFrame.lua Sun Apr 10 04:35:32 2016 -0400 +++ b/ObjectiveTracker/ObjectiveFrame.lua Mon Apr 11 09:07:40 2016 -0400 @@ -56,35 +56,7 @@ local currentPosition, anchorFrame, anchorPoint -T.colors ={ - default = { - titlebg = {'HORIZONTAL', 1, 0, .7, .25, 1, 0, .7, .125}, - textbg = {'HORIZONTAL', 0, 0, 0, 0.4, 0, 0, 0, 0 }, - selectionbg = {'HORIZONTAL', 1, 1, 1, 0, 1, 1, 1, 0.225}, - }, - daily = { - titlebg = {'HORIZONTAL', 0, .7, 1, .25, 0, 1, .7, .125}, - textbg = {'HORIZONTAL', 0, .7, 1, .1, 0, 1, .7, .075 }, - }, - weekly = { - titlebg = {'HORIZONTAL', 0, .35, .7, .25, 0, .35, .7, .125}, - textbg = {'HORIZONTAL', 0, .35, .7, .1, 0, .35, .7, .075 }, - }, - account = { - titlebg = {'HORIZONTAL', .1, .1, .1, .25, .1, .1, .1, .125}, - textbg = {'HORIZONTAL', .1, .1, .1, 0.4, .1, .1, .1, .085 }, - }, - -- alliance - faction_1 = { - titlebg = {'HORIZONTAL', .2, .4, 1, 0.4, .2, .4, 1, .085 }, - textbg = {'HORIZONTAL', .2, .4, 1, 0.4, .2, .4, 1, .085 }, - }, - -- horde - faction_2 = { - titlebg = {'HORIZONTAL', .6, 0, 0.4, 0.4, .6, 0, 0.4, .085 }, - textbg = {'HORIZONTAL', .6, 0, 0.4, 0.4, .6, 0, 0.4, .085 }, - } -} + T.AddBlock = function(handler, block) local print = bprint @@ -178,7 +150,7 @@ block.title:SetPoint('TOP', block, 'TOP', 0, -titleSpacing) block.titlebg:SetTexture(1,1,1,1) - block.titlebg:SetGradientAlpha(unpack(colors.default.titlebg)) + block.titlebg:SetGradientAlpha(unpack(T.colors.default.titlebg)) block.titlebg:SetPoint('TOP', block, 'TOP', 0, 0) block.titlebg:SetPoint('BOTTOM', block.title, 'BOTTOM', 0, -titleSpacing) @@ -189,9 +161,9 @@ block.statusbg:SetPoint('TOP', block.titlebg, 'BOTTOM', 0, 0) block.statusbg:SetPoint('BOTTOM', block, 'BOTTOM', 0, 0) block.statusbg:SetTexture(1,1,1,1) - block.statusbg:SetGradientAlpha(unpack(colors.default.textbg)) + block.statusbg:SetGradientAlpha(unpack(T.colors.default.textbg)) - block.SelectionOverlay:SetGradientAlpha(unpack(colors.default.selectionbg)) + block.SelectionOverlay:SetGradientAlpha(unpack(T.colors.default.selectionbg)) block.SelectionOverlay:SetPoint('TOPLEFT', selectionIndent, 0) block.SelectionOverlay:SetPoint('BOTTOMRIGHT') @@ -751,11 +723,13 @@ Scroll:Show() end Quest.GetClosest() - + --T.UpdateActionButtons(reason) end --- Queue any active item buttons for update for that frame +local iprint = B.print('ItemButton') T.UpdateActionButtons = function(updateReason) + local print = iprint Scroller.snap_upper = 0 Scroller.snap_lower = 0 local print = B.print('ItemButton') @@ -764,7 +738,7 @@ end local previousItem - for questID, itemButton in pairs(usedButtons) do + for questID, itemButton in pairs(Quest.itemButtons) do local info= T.Quest.Info[questID] print('|cFF00FFFF'.. questID .. '|r', itemButton:GetName()) @@ -799,6 +773,7 @@ end T.UpdateBlockAction = function (block, itemButton) + local print = iprint print('**|cFF0088FF'..itemButton:GetName(), '|r:Update()') if itemButton.questID ~= block.info.questID then print('** |cFFFF0088mismatched block assignment', itemButton.questID,'<~>', block.info.questID)