Closed ls- closed 6 months ago
/run X=PlayerFrame.PlayerFrameContent.PlayerFrameContentMain.HealthBarArea.HealthBar
/run Y=CreateFrame('StatusBar', '$parent_RedBar', X);Y:SetSize(100, 20);Y:SetPoint('LEFT', X:GetStatusBarTexture(), 'RIGHT');Y:SetStatusBarTexture([[Interface\Buttons\White8x8]]);Y:SetStatusBarColor(1, 0, 0, 1);Y:SetMinMaxValues(0, 1);Y:SetValue(0)
/run W=CreateFrame('StatusBar', '$parent_GreenBar', X);W:SetSize(100, 20);W:SetPoint('LEFT', Y:GetStatusBarTexture(), 'RIGHT');W:SetStatusBarTexture([[Interface\Buttons\White8x8]]);W:SetStatusBarColor(0, 1, 0, 1);W:SetMinMaxValues(0, 6);W:SetValue(3)
do those 3:
then do: /run Y:SetValue(0.1)
:
then do: /run Y:SetValue(0)
:
then do: /run Y:SetValue(0.0001)
then do: /run Y:SetValue(0)
and /run Y:SetStatusBarTexture([[Interface\Buttons\White8x8]])
last one: when the value
is the same as the min
value and the texture is changed, the position of the GetStatusBarTexture
is reset to full.
this also effects Classic Era 1.15
The bug is fixed in 10.2.5, and I hope it stays this way 🙏🏻
Marking as fixed based upon the 10.2.5 feedback.
In 10.2 the status bar behaviour was changed.
Right now when the current value is set to whatever the min value is, it breaks all the anchors of whatever is attached to the status bar texture, in this example it's a secondary status bar:
That said, if you set the bar value to any value that isn't min value afterwards, the secondary bar will reattach itself properly again.
Moreover, it seems that instead of being actually empty, the status bar's texture is simply invisible, but its width is set to the max instead of being ~0, so if you try to attach anything to it, it'll look like this:
For context, this is the pre-10.2 behaviour. I could reproduce it by setting the min value to -0.001 instead of 0, any value that's just a tiiiiny bit lower than the desired min value should do the trick here. So at least there's a workaround, I guess.