Mercurial > wow > buffalo2
changeset 12:8238cddaddb1
ObjectiveUI
- fillers for 'Hidden' objective widgets
author | Nenue |
---|---|
date | Sat, 02 Apr 2016 05:01:54 -0400 |
parents | fb80e365bab3 |
children | 9455693fc290 |
files | ObjectiveFrame.lua ObjectiveTracker.xml ObjectiveUI.lua ObjectiveWidgets.xml |
diffstat | 4 files changed, 40 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ObjectiveFrame.lua Sat Apr 02 03:23:12 2016 -0400 +++ b/ObjectiveFrame.lua Sat Apr 02 05:01:54 2016 -0400 @@ -33,7 +33,7 @@ local titleOutline, textOutline = "OUTLINE", "OUTLINE" local titleSpacing, textSpacing = 4, 3 local textIndent = 5 -local wrapperMaxWidth, wrapperMaxHeight = 280, 490 -- these are the hard bounds, actual *Height variables are changed +local wrapperMaxWidth, wrapperMaxHeight = 270, 490 -- these are the hard bounds, actual *Height variables are changed local wrapperHeadFont, wrapperHeadSize, wrapperHeadOutline = [[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 16, 'NONE' local headerFont, headerSize, headerHeight = [[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 18, 24 local headerOutline, headerColor, headerSpacing = 'OUTLINE', {1,1,1,1}, 2 @@ -127,7 +127,7 @@ --- xp bar XPBar:SetWidth(wrapperWidth - Wrapper.close:GetWidth()) - XPBar.bg:SetAllPoints(XPBar) + XPBar.statusbg:SetAllPoints(XPBar) XPBar:RegisterEvent('DISABLE_XP_GAIN') XPBar:RegisterEvent('ENABLE_XP_GAIN') XPBar:SetScript('OnEvent', mod.UpdateXP) @@ -145,7 +145,7 @@ self:RegisterEvent('PLAYER_XP_UPDATE') self:RegisterEvent('PLAYER_LEVEL_UP') self:RegisterEvent('PLAYER_UPDATE_RESTING') - self.bg:SetTexture(0,0,0,.25) + self.statusbg:SetTexture(0,0,0,.25) self:Show() end @@ -153,7 +153,7 @@ self:UnregisterEvent('PLAYER_XP_UPDATE') self:UnregisterEvent('PLAYER_LEVEL_UP') self:UnregisterEvent('PLAYER_UPDATE_RESTING') - self.bg:SetTexture(0.5,0.5,0.5,0.5) + self.statusbg:SetTexture(0.5,0.5,0.5,0.5) self:Hide() end @@ -169,7 +169,7 @@ local xp = UnitXP('player') local xpmax = UnitXPMax('player') local rest = GetXPExhaustion() - self.fg:SetWidth((xp/xpmax) * self:GetWidth()) + self.foreground:SetWidth((xp/xpmax) * self:GetWidth()) if rest then self.rested:ClearAllPoints() if xp == 0 then @@ -190,9 +190,9 @@ end if IsResting() then - self.bg:SetTexture(.2,.8,.2,.5) + self.statusbg:SetTexture(.2,.8,.2,.5) else - self.bg:SetTexture(0,0,0,.25) + self.statusbg:SetTexture(0,0,0,.25) end self.xpText:SetText(xp .. '/'.. xpmax .. (rest and (' ('..tostring(rest)..')') or '')) end
--- a/ObjectiveTracker.xml Sat Apr 02 03:23:12 2016 -0400 +++ b/ObjectiveTracker.xml Sat Apr 02 05:01:54 2016 -0400 @@ -104,7 +104,7 @@ </Anchors> <Layers> <Layer level="BACKGROUND"> - <Texture name="$parentBackground" parentKey="background" setAllPoints="true"/> + <Texture name="$parentBackground" parentKey="statusbg" setAllPoints="true"/> </Layer> <Layer level="ARTWORK">
--- a/ObjectiveUI.lua Sat Apr 02 03:23:12 2016 -0400 +++ b/ObjectiveUI.lua Sat Apr 02 05:01:54 2016 -0400 @@ -383,4 +383,12 @@ self.fg:Show() self.fg:SetWidth((self.bg:GetWidth()-4) * (quantity / requiredQuantity)) end +end + + +mod.InitializeWidget.Hidden = function (self) + self.height = 0 +end +mod.UpdateWidget.Hidden = function (self) + self.height= 0 end \ No newline at end of file
--- a/ObjectiveWidgets.xml Sat Apr 02 03:23:12 2016 -0400 +++ b/ObjectiveWidgets.xml Sat Apr 02 05:01:54 2016 -0400 @@ -67,4 +67,28 @@ </Layer> </Layers> </Frame> + + <Frame name="VeneerObjectiveCriteriaHidden" virtual="true" hidden="true"> + <Size x="250" y="24" /> + <Scripts> + <OnLoad> + self.widgetType = 'Hidden' + self.lines = 0 + Veneer.ObjectiveTracker.RegisterWidget(self) + </OnLoad> + <OnShow> + Veneer.ObjectiveTracker.InitializeWidget(self) + </OnShow> + <OnHide> + Veneer.ObjectiveTracker.ReleaseWidget(self) + </OnHide> + </Scripts> + <Layers> + <Layer level="OVERLAY"> + <FontString name="$parentQuantityString" parentKey="quantityString" inherits="VeneerCriteriaFont"> + + </FontString> + </Layer> + </Layers> + </Frame> </Ui> \ No newline at end of file