How to - Power Bar

Started by am, Sat 19/04/2003 23:33:22

Previous topic - Next topic

am

Hi, I need to add a power bar to a GUI, it needs to have 10 levels (plus a "0" level) and a "power up" level.
I tried using a slider for it, but this gives the user the ability to modify it, and it should only be modifidable by script.
Anyone got an Idea?

--------------------------
Check out http://www.geocities.com/bblasting for "Blaster's Blasting Adventure" game's home page

RickJ

You can use a button and SetButtonPic to do this.  You will need a different graphic for each displayable level.  Specify a graphic for the "normal" view only (not for "mouse over" and "pressed" views.  Also specify "no action" for the left click parameter.    

I eat butter

you could use RawDrawLine
Soldiers are skilled to do the unthinkable.
Politicians are skilled to let someone else do the unthinkable.

am

Thanks,
I tried the RawDrawLine, but it didn't draw on the GUI, only on the room screen, and it is too much work to paint a power bar one line at a time, I think I'll go with the SetButtonPic, unless someone is writting a power-bar DLL ?

BlackBaron

You don't have to draw the bar line by line, you could use a while loop.

It is easier to use pre-drawn pictures and SetButtonPic, but note that that's not the most efficient method, it's ok if you're only using 12 different levels (10 + normal + power up), but if you need a lot more of power levels, say 100, you really should give shot to the RawDrawLine method.
"Do you thirst for knowledge no matter the cost?"
            -Watrik, master glassblower

SMF spam blocked by CleanTalk