View Single Post
09-17-10, 09:14 PM   #1
Tiok
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 2
Unlisted StatusBar Changes?

One of the basic widget types is the StatusBar (like the experience bar, fills from left to right).

In an addon, I create a StatusBar in the XML like this:

Code:
 <StatusBar name="MyStatusBar" drawLayer="ARTWORK" minValue="0" maxValue="100" defaultValue="50">
     ...
</StatusBar>
Now from the LUA I access the StatusBar thusly:

Code:
MyStatusBar:GetValue()
And it returns a zero, even though the defaultValue was set to 50.

In addition, I can literally do this:

Code:
MyStatusBar:SetValue(50)
MyStatusBar:GetValue()
And it still returns a zero.

... (edited) ...

After a lot of testing, it turns out that the minValue and maxValue set in the XML are being ignored. It works perfectly fine if you call SetMinMaxValue(0,100) from Lua somewhere. Still, any clue what broke this, or why?

Last edited by Tiok : 09-17-10 at 10:12 PM.