WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Cataclysm Beta (https://www.wowinterface.com/forums/forumdisplay.php?f=82)
-   -   Unlisted StatusBar Changes? (https://www.wowinterface.com/forums/showthread.php?t=35026)

Tiok 09-17-10 09:14 PM

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?

Vlad 09-18-10 05:20 AM

Not sure, may be a bug they will fix. Or perhaps they want LUA to set these attributes now, also I saw you edited and I saw you figured the MinMaxValue thingy I was going to suggest. :p

zork 09-20-10 06:19 AM

Maybe they had default values for min/max that got removed, thus you need to set them now yourself. min/max could be anything.


All times are GMT -6. The time now is 08:27 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI