Mercurial > wow > buffalo2
diff ObjectiveWidgets.lua @ 22:9b3fa734abff
ObjectiveFrame
- polish quest rewards display
- implement money objectives
- set line metrics in UpdateLine
- set block metrics in UpdateBlock (sum of line metrics)
author | Nenue |
---|---|
date | Sat, 09 Apr 2016 07:32:45 -0400 |
parents | d5ee940de273 |
children |
line wrap: on
line diff
--- a/ObjectiveWidgets.lua Fri Apr 08 06:12:05 2016 -0400 +++ b/ObjectiveWidgets.lua Sat Apr 09 07:32:45 2016 -0400 @@ -104,6 +104,7 @@ ToggleWorldMap() end + mod.InitializeWidgets = function() --- tracker scroll Scroller:SetScript('OnMouseWheel', Scroller_OnMouseWheel) @@ -214,7 +215,7 @@ if (rangeTimer <= 0) then local link, item, charges, showItemWhenComplete = GetQuestLogSpecialItemInfo(self.questLogIndex) if ((not charges) or (charges ~= self.charges)) then - mod.UpdateWrapper() + mod:Update() return end @@ -382,7 +383,7 @@ } local progressHeight = 16 -local progressBorder = 2 +local progressBorder = 1 local progressIndent = 3 local progressFont = _G.VeneerCriteriaFontNormal @@ -397,8 +398,8 @@ self.bg:SetHeight(progressHeight) self.bg:SetWidth(self.width) self.fg:ClearAllPoints() - self.fg:SetPoint('BOTTOMLEFT', self, 'BOTTOMLEFT', self.indent, self.indent) - self.fg:SetHeight(progressHeight - progressIndent * 2) + self.fg:SetPoint('BOTTOMLEFT', self, 'BOTTOMLEFT', progressBorder, progressBorder) + self.fg:SetHeight(progressHeight - progressBorder * 2) self.status:SetFontObject(progressFont) self.status:SetText(self.objective.quantityString) end @@ -417,13 +418,13 @@ local progress = (quantity / requiredQuantity) if progress >= 1 then self.fg:Show() - self.fg:SetWidth(self.width - self.indent) + self.fg:SetWidth(self.width - progressBorder * 2) elseif progress > 0 then self.fg:Show() print('color:', 1-progress*2 , progress*2 - 1,0,1) - print('width:', (self.width -self.indent) * progress) + print('width:', (self.width -progressBorder * 2) * progress) self.fg:SetTexture(1-progress*2 , progress*2,0,1) - self.fg:SetWidth((self.width -self.indent) * progress) + self.fg:SetWidth((self.width -progressBorder * 2) * progress) else self.fg:Hide() end