Mercurial > wow > buffalo2
diff ObjectiveTracker/Frame.lua @ 33:64f2a9bbea79
- implementing structural revisions in bonus objectives
- prevent instances of nil arithmetic
- decide on where to keep style values
- start widgets with dummy values for operability
author | Nenue |
---|---|
date | Fri, 15 Apr 2016 17:01:06 -0400 |
parents | a3afe6c3771e |
children | 9856ebc63fa4 |
line wrap: on
line diff
--- a/ObjectiveTracker/Frame.lua Fri Apr 15 07:01:40 2016 -0400 +++ b/ObjectiveTracker/Frame.lua Fri Apr 15 17:01:06 2016 -0400 @@ -57,7 +57,7 @@ text = {.5,.75,1}, }, completed = { - text = {1,0,.1} + text = {0, 1, 0} }, failed = { text = {1,0,0 } @@ -147,9 +147,10 @@ -- For progressbar and timer lines, status text may be used as the title heading if attachment then local widgetOffset = 0 + line.height = attachment:GetHeight() + textSpacing if text and #text >= 1 then widgetOffset = line.status:GetHeight() + textSpacing - line.height = floor(line.status:GetStringHeight()+.5) + textSpacing + attachment.height + line.height = line.height + floor(line.status:GetStringHeight()+.5) + textSpacing print(' |cFFFF0088doing things with captioned widget') else print(' |cFFFF0088doing things with a widget') @@ -229,6 +230,7 @@ block.title:SetSpacing(c.TitleSpacing) block.title:SetPoint('TOP', block, 'TOP', 0, -titleSpacing) + block.title:SetPoint('LEFT', block, 'LEFT', titleIndent, 0) block.titlebg:SetTexture(1,1,1,1) block.titlebg:SetGradientAlpha(unpack(titlebg)) @@ -541,9 +543,9 @@ local numCurrency = 0 for i, rewardTile in ipairs(block.rewardTile) do - local reward = info.rewardInfo[i] - if reward then - --rewardTile:SetPoint(tagPoint, tagAnchor, tagRelative, -2, -2) + if info.rewardInfo and info.rewardInfo[i] then + local reward = info.rewardInfo[i] + --rewardTile:SetPoint(tagPoint, tagAnchor, tagRelative, -2, -2) rewardTile:SetTexture(reward.texture) rewardTile:Show() @@ -608,7 +610,7 @@ if (info.isComplete or info.numObjectives == 0) and info.completionText then print(' overriding line #1 for completion text:', info.completionText) text = info.completionText - handler:AddLine(block, text, nil) + handler:AddLine(block, text, nil, 'completed') else if info.objectives then for i, data in ipairs(info.objectives) do