Skip to content

Commit 34e7f35

Browse files
committed
Maybe fixed colours and stuff?
1 parent 8f6c6a8 commit 34e7f35

2 files changed

Lines changed: 49 additions & 12 deletions

File tree

Textures/ArtaeumGroupTool.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,27 @@
153153
</Controls>
154154
</StatusBar>
155155

156+
<StatusBar name="AD_Group_ShieldBarTemplate_Gamepad_Template" inherits="ZO_PowerShieldBar ZO_DefaultStatusBarBase" virtual="true">
157+
<Dimensions y="29" />
158+
<Controls>
159+
<StatusBar name="$(parent)Trauma" inherits="ZO_DefaultStatusBarBase">
160+
<Dimensions y="29" />
161+
</StatusBar>
162+
163+
<StatusBar name="$(parent)FakeHealth" inherits="ZO_DefaultStatusBarBase">
164+
<Dimensions y="29" />
165+
</StatusBar>
166+
167+
<StatusBar name="$(parent)NoHealingInner" inherits="ZO_DefaultStatusBarBase">
168+
<Dimensions y="29" />
169+
</StatusBar>
170+
171+
<StatusBar name="$(parent)FakeNoHealingInner" inherits="ZO_DefaultStatusBarBase">
172+
<Dimensions y="29" />
173+
</StatusBar>
174+
</Controls>
175+
</StatusBar>
176+
156177

157178

158179
</Controls>

utils/AD_Frames.lua

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,25 @@ function frameObject:new(unitTag, parent)
130130
fakeHealthGradientOverride = {grad,grad},
131131
--noHealingGradientOverride = { ZO_ColorDef:New(0,0,0,1), ZO_ColorDef:New(0,0,0,1) },
132132
}
133-
frame.visualizer:AddModule(ZO_UnitVisualizer_PowerShieldModule:New(VISUALIZER_POWER_SHIELD_LAYOUT_DATA))
133+
134+
frame.shieldVis = ZO_UnitVisualizer_PowerShieldModule:New(VISUALIZER_POWER_SHIELD_LAYOUT_DATA)
135+
frame.visualizer:AddModule(frame.shieldVis)
136+
137+
frame.shieldVis:InitializeBarValues()
138+
139+
140+
-- THIS IS WEIRD, TODO: REPLACE LATER
141+
142+
---aaaa = frame
143+
--frame.health.barControls = {}
144+
--a = frame
145+
--aa = ZO_ShallowTableCopy(frame.shieldVis)
146+
--aaa = ZO_ShallowTableCopy(frame.shieldVis.attributeInfo)
147+
--aaaa = ZO_ShallowTableCopy(frame.shieldVis.attributeBarControls)
148+
frame.shieldVis:ShowOverlay(frame.shieldVis.attributeBarControls[ATTRIBUTE_HEALTH], frame.shieldVis.attributeInfo[ATTRIBUTE_HEALTH])
134149

135150
frame.healthEffects = {}
151+
frame:GetHealthEffects()
136152

137153
frame.frame:SetHidden(true)
138154

@@ -143,7 +159,7 @@ end
143159

144160
function frameObject:GetHealthEffects() -- might replace these conditionals with a func to get/check (or just always reassign)
145161
if self.healthEffects.shield == nil then
146-
self.healthEffects.shield = self.frame:GetNamedChild("PowerShieldLeftOverlay")
162+
self.healthEffects.shield = self.health:GetNamedChild("PowerShieldLeftOverlay")
147163
end
148164
if self.healthEffects.shield ~= nil then
149165
if self.healthEffects.trauma == nil then
@@ -188,9 +204,9 @@ function frameObject:Update()
188204
self.displayName = GetUnitDisplayName(self.unitTag)
189205
local rgb = AD.vars.Group.colours.standardHealth
190206
self.health:SetColor(unpack(rgb))
191-
local healthEffects = self:GetHealthEffects()
192-
if healthEffects.fakeHealth ~= nil then
193-
healthEffects.fakeHealth:SetColor(unpack(rgb))
207+
--local healthEffects = self:GetHealthEffects()
208+
if self.healthEffects.fakeHealth ~= nil then
209+
self.healthEffects.fakeHealth:SetColor(unpack(rgb))
194210
end
195211

196212
self.hasUlt = false
@@ -272,9 +288,9 @@ function frameObject:SetMagStamHidden(value)
272288
self.health:SetHeight(self.originalHealthHeight-8)
273289
end
274290
self.health:SetHeight(newHeight)
275-
local healthEffects = self:GetHealthEffects()
276-
for i,v in pairs(healthEffects) do
277-
v:SetHealth(newHeight)
291+
--local healthEffects = self:GetHealthEffects()
292+
for i,v in pairs(self.healthEffects) do
293+
v:SetHeight(newHeight)
278294
end
279295
end
280296

@@ -414,12 +430,12 @@ function frameObject:setUlt(ultValue, ult1Cost, icon1, ult2Cost, icon2)
414430

415431
local rgb = AD.vars.Group.colours.standardHealth
416432
if maxedUlt then
417-
local rgb = AD.vars.Group.colours.fullUlt
433+
rgb = AD.vars.Group.colours.fullUlt
418434
end
419435
self.health:SetColor(unpack(rgb))
420-
local healthEffects = self:GetHealthEffects()
421-
if healthEffects.fakeHealth ~= nil then
422-
healthEffects.fakeHealth:SetColor(unpack(rgb))
436+
--local healthEffects = self:GetHealthEffects()
437+
if self.healthEffects.fakeHealth ~= nil then
438+
self.healthEffects.fakeHealth:SetColor(unpack(rgb))
423439
end
424440
self.hasUlt = true
425441
end

0 commit comments

Comments
 (0)