-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick band-aid fix for always visible 1-2 pixel bar #22
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ local StatusBarPrototype = T.StatusBarPrototype | |
|
||
function ZUF.HealthClipFrame_HealComm(frame) | ||
if frame.HealCommBar then | ||
ZUF:SetAlpha_HealComm(frame.HealCommBar, 1) | ||
ZUF:SetAlpha_HealComm(frame.HealCommBar, 0) --xD changed from 1 to 0 to start it off hidden avoiding bug yet still have it there so it still positions properly | ||
end | ||
end | ||
|
||
|
@@ -303,6 +303,30 @@ function ZUF:UpdateHealComm(_, myIncomingHeal, otherIncomingHeal, absorb, _, has | |
local missingHealth = maxHealth - health | ||
local healthPostHeal = health + myIncomingHeal + otherIncomingHeal | ||
|
||
-- xD shit code fix to visually hide heal and absorb bar if it is empty avoiding the 1 pixel line they each have by default in that state. Can prob be placed in a better position and fixed in a much better way. | ||
-- This fix is insipred by EvlUI's default function "UpdateFillBar" in their HealComm.lua, they use "if amount == 0 then bar:Hide()" there to do the same thing, calling it on UpdateHealComm. The reason I used SetAlpha instead is | ||
-- that for Zidras UpdateHealComm using :Hide() breaks bar positioning. | ||
|
||
if healthPostHeal == health then | ||
self.myBar:SetAlpha(0) | ||
self.otherBar:SetAlpha(0) | ||
else | ||
self.myBar:SetAlpha(1) | ||
self.otherBar:SetAlpha(1) | ||
end | ||
|
||
if absorb == 0 then | ||
healAbsorbBar:SetAlpha(0) | ||
absorbBar:SetAlpha(0) | ||
overAbsorb:SetAlpha(0) | ||
else | ||
healAbsorbBar:SetAlpha(1) | ||
absorbBar:SetAlpha(1) | ||
overAbsorb:SetAlpha(1) | ||
end | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would fail if you had one of the IncHeals present. Ideally, for the bandaid to work, I assume you'd have to check the Incoming value for 0 and AlphaHide the respective bar |
||
-- xD end of shit code | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, not all bars are absorb |
||
-- handle over heal absorbs | ||
healAbsorbBar:ClearAllPoints() | ||
healAbsorbBar:Point(pred.anchor, frame.Health) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks raid frame prediction, and I also find this not to be an adequate change since it affects bar creation