Mercurial > wow > buffalo2
diff ObjectiveFrame.lua @ 16:880828018bf4
ObjectiveEvents
- trim down the number of events that fire full updates
- begin the general outline for determining which trackers need to refresh
- handlers for accepting and completing auto-popup quests
ObjectiveFrame
- correct variables for money reward calculation
- make sure everythign is scaling to the font strings and that the font strings aren't being pinned by SetSize
ObjectiveInfo
- implementation of autoquest popups
- discern between internal and client bonus objective indexes
- acquire the correct data set from bonus objective query
ObjectiveStyle
- look for a style table under the previously interpreted set before deferring standard options
- horizontal/vertical options in gradient
- remove height-fixing for font strings
author | Nenue |
---|---|
date | Tue, 05 Apr 2016 00:39:12 -0400 |
parents | f660f1c1e0aa |
children | d1812fb10ae6 |
line wrap: on
line diff
--- a/ObjectiveFrame.lua Mon Apr 04 03:41:28 2016 -0400 +++ b/ObjectiveFrame.lua Tue Apr 05 00:39:12 2016 -0400 @@ -81,7 +81,7 @@ end --- xp bar - XPBar:SetWidth(wrapperWidth - Wrapper.close:GetWidth()) + XPBar:SetWidth(mod.Conf.Wrapper.WrapperWidth - Wrapper.CloseButton:GetWidth()) XPBar.statusbg:SetAllPoints(XPBar) XPBar:RegisterEvent('DISABLE_XP_GAIN') XPBar:RegisterEvent('ENABLE_XP_GAIN') @@ -243,7 +243,7 @@ --end if info.numObjectives >= 1 then - t.attachmentHeight = textSpacing + t.attachmentHeight = 0 t.status:Show() print(' lines to build:', info.numObjectives) @@ -256,6 +256,7 @@ t.status:SetText(nil) end t.title:SetText(info.title) + print(' ', t.status:CanWordWrap(), t.status:GetStringHeight()) if info.specialItem and not info.itemButton then @@ -273,12 +274,25 @@ print(' anchor to|cFF0088FF', previousBlock:GetName()) end + --- metrics are calculated in SetStyle t:SetStyle('TrackerBlock', handler.name, t.mainStyle, t.subStyle) t:Show() print(' |cFF00FFFF)|r -> ', t, t:GetHeight()) + if info.rewardInfo then + print('has immediate reward') + if info.rewardInfo[1].type == 'currency' or info.rewardInfo[1].type == 'item' then + t.icon:Show() + t.iconLabel:SetText(info.rewardInfo[1].count) + t.icon:SetSize(t.height, t.height) + t.icon:SetTexture(info.rewardInfo[1].texture) + end + + else + t.icon:Hide() + end if Devian and Devian.InWorkspace() then t.debugText:Show() @@ -309,6 +323,10 @@ if line.widget then + if attachmentHeight == 0 then + attachmentHeight = block.status.spacing + end + line.widget:Show() line.widget:SetParent(block) line.widget:SetPoint('TOPLEFT', block.status, 'BOTTOMLEFT', 0, -attachmentHeight ) @@ -329,6 +347,7 @@ block.attachmentHeight = attachmentHeight block.status:SetText(text) + block.status:SetWordWrap(true) end --- Objective parsers @@ -351,9 +370,7 @@ Bonus.ParseObjective = function(line, info) local print = B.print('BonusLine') - for k,v in pairs(line) do - print(k, v) - end + line.displayColor = 'FFFFFF' if line.text and not info.title then @@ -425,7 +442,8 @@ mod.Quest.numButtons = 0 local usedButtons = mod.Quest.itemButtons local freeButtons = mod.Quest.freeButtons -mod.UpdateWrapper = function() +mod.UpdateWrapper = function(reason) + print('|cFF00FFFFUpdateWrapper:|r', reason) unitLevel = UnitLevel('player') wrapperWidth = mod.Conf.Wrapper.WrapperWidth scrollWidth = mod.Conf.Wrapper.WrapperWidth