IProgressBar: A progress-bar gui element

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

thanks for your help. I think that now my code will work correctly...wait fom a code blocks user response ;)
Brainsaw
Posts: 1176
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

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
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

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.
right, but I doubt this realy matters for a constructor... :lol:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
trollger
Posts: 84
Joined: Tue Jun 01, 2010 2:17 am
Location: At my computer

Post by trollger »

Thanks! :D
sorry I wasn't really paying attention to my post.
the first answer was the problem.
docWild
Posts: 38
Joined: Wed Nov 30, 2011 4:29 pm

Re: IProgressBar: A progress-bar gui element

Post by docWild »

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.
Post Reply