Rounded Progress Bar?
Community Forums/General Help/Rounded Progress Bar?
| ||
Does anyone know how to create a rounded progress bar like what you would see in the Orange Box? I know how to make/draw one, I just don't know the maths to get it from 0% to 100% if you know what I mean. |
| ||
No, I'm afraid I don't quite know what you mean. Do you want the formula for percentages? Is this for a Blitz program, website, Flash application, or what? |
| ||
Progress Bar outer![]() Progress Bar inner ![]() I would like for it to look and act almost exactly the same as how the loading bars in Half-Life 2, Portal, and Team Fortress 2 do. But the maths needed are going to be a little different than standard rectangle progress bars and I don't know how to do it. |
| ||
i assumed this was for blitzmax and i put this together in about 5 mins, its not perfect and theres much better ways to do it, but its a start. pbar: ![]() pbarshell: ![]() |
| ||
Eh... Is there a way so that 1% is the full circle I posted above. |
| ||
Subtract the width of the full circle from the width of your progress bar before doing the calculations. |
| ||
But the maths needed are going to be a little different than standard rectangle progress bars and I don't know how to do it. no they arnt, 100% is 100% regardless of if its 1mb or 100mb, each percentage would take longer the larger the file/s you are progressing all it is is a curved progression instead of a flat boring line, hell you could have hello kitty's head (lealities notwithstanding) as the status indicator and it would still be the same at the end of the day its just an indicator to the player that something is happening, its better than just 'loading' fading in and out for five minutes |
| ||
Not sure if BlitzMax has the Oval command that Blitz3D does, but if so you could make a progress bar with that. Just draw a stretched out white one like you did in your last post Ked, then every time you wish to increase the loading bar, simply draw a small orange oval inside of the white one, thats so many pixles away from the last orange oval. Or you can ditch the ovals, and simply use the two images you already have if blitzmax doesn't have the oval command. I can make an example for you if you need it, once I get back in from work. WERDNA |
| ||
Thanks anyway, everybody. I've found a solution that I like the best. |
| ||
Cool! Good luck to you then Ked. |
| ||
What I'd do: - draw empty bar - draw circle on the far left - draw orange rectangle up to the point the bar should go - draw another orange circle at the end Figure out how many pixels are in the bar (from center of circle on the far left to center of circle on the far right), divide by 100, and each percent increases the size of the rectangle by that many pixels. |
| ||
I'm using a really simple method. :) 1. Have two images: the outer part of the progbar; the inner part of the progbar, all of it (as if it was set to 100%) 2. Use the DrawImageRect() function from the code archives to draw the inner part according to what value is passed. Really simple, but I like how you can have a crazy-malformed shape of a progress bar and it would still work. EDIT: I might post some demos later. |
| ||
by the way is this the xbox version of the orange box? because ive just played the Pc version protal and TF2 and cant see this bar anywhere? |
| ||
Yeah, it's the 360 version. The PC version is using Source's VGUI and it sucks. :P |