IProgressBar: A progress-bar gui element
I just added the progress bar to my Stunt Marble Racers project. Works fine, no problems (although I renamed the class from IProgressBar to CProgressBar ). Btw: I am using Code::Blocks as IDE.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
right, but I doubt this realy matters for a constructor...hybrid wrote:Your version now creates a copy, which works with temporaries as arguments, but requires additional cycles on each call. With your original version using a reference, the temporary cannot be used as an argument.
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Re: IProgressBar: A progress-bar gui element
The problem with this implementation is that the position setting does not take into account the element's parent's position so the call to the IVideoDriver drawing methods will draw the progress bar at an absolute position regardless of the parent window/element updates.
My plan is to do a rewrite of this, as the basic idea is sound. Another addition I'm thinking about is to do it all with textures. i.e create a border and background texture with the video driver in construction but also add an override for user supplied textures which should allow the class to draw either a normal coloured pbar or a texture supplied pbar using the same logic.
My plan is to do a rewrite of this, as the basic idea is sound. Another addition I'm thinking about is to do it all with textures. i.e create a border and background texture with the video driver in construction but also add an override for user supplied textures which should allow the class to draw either a normal coloured pbar or a texture supplied pbar using the same logic.