I reopen a really old thread, but with the 7.0 patch, the "ReverseBar" function doesn't work, and I don't have any idea why. Calling "tex:SetPoint" with any parameters doesn't seem to have any effect.
I am using a custom fork of oUF_Mono witch use this function :
lua Code:
local ReverseBar
do
local UpdaterOnUpdate = function(Updater)
Updater:Hide()
local b = Updater:GetParent()
local tex = b:GetStatusBarTexture()
tex:ClearAllPoints()
tex:SetPoint("BOTTOMRIGHT")
tex:SetPoint("TOPLEFT", b, "TOPRIGHT", (b:GetValue()/select(2,b:GetMinMaxValues())-1)*b:GetWidth(), 0)
end
local OnChanged = function(bar)
bar.Updater:Show()
end
function ReverseBar(f)
local bar = CreateFrame("StatusBar", nil, f)
bar.Updater = CreateFrame("Frame", nil, bar)
bar.Updater:Hide()
bar.Updater:SetScript("OnUpdate", UpdaterOnUpdate)
bar:SetScript("OnSizeChanged", OnChanged)
bar:SetScript("OnValueChanged", OnChanged)
bar:SetScript("OnMinMaxChanged", OnChanged)
return bar;
end
end
Using ReverseFill doesn't work either, because of the Smooth plugin : calling SetValue in a PostUpdate callback make the bar going from right to left continually. I'll try to hack this plugin, but this solution doesn't look very good to me.
Any help appreciated, and I apologize for my bad english :-)