A Customizable GUI Progressbar for irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
mohaps
Posts: 248
Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:

A Customizable GUI Progressbar for irrlicht

Post by mohaps »

Hi All,

as part of the M_TRIX project, here is a demo of a customizable GUI progressbar for Irrlicht.


Image
click here for the webpage


Some features:

a) can be vertical or horizontal
b) the image can be customized
c) fill color can be changed at will (so if you want to have red for 0 and green for 100 and interpolate so be it) :)

Features coming soon:

a) REverse order filling (right to left and top to bottom for inverted progressbars)
b) proper lib and zip file based add on distribution.
---
Saurav Mohapatra
author, artist and bona fide geek

web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Guest

Post by Guest »

niiice dude! now can u figure out how to get image scaling turned on lol
mohaps
Posts: 248
Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:

Post by mohaps »

what do you mean by image scaling... you mean the ability to scale an image on to an arbitrary sized rectangle???
---
Saurav Mohapatra
author, artist and bona fide geek

web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Guest

Post by Guest »

like if i have a 1024x768 texture, and i assign it to a 1280x960 rectangle, i want it to scale to that rectangle

and visa versa also
mohaps
Posts: 248
Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:

Post by mohaps »

the easiest fix for that would be to draw a textured quad with [0,0] and [1,1]
as the texture coordinates...

let me see if i can hack up something tonight.. :)

similar to driver->draw2DImage()
---
Saurav Mohapatra
author, artist and bona fide geek

web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Guest

Post by Guest »

ur a beast 8)
mohaps
Posts: 248
Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:

Post by mohaps »

yo guest,

it already is there in irrlicht

Code: Select all

static ITexture* img = getVideoDriver()->getTexture("small-shot.jpg");
	if(img)
	{
		dimension2d<s32> dim = img->getOriginalSize();
		s32 x = 200;
		s32 y = 200;
		rect<s32> dstRect(x,y, x+ dim.Width + 150, y+dim.Height);
		rect<s32> srcRect(0,0,dim.Width,dim.Height);
		getVideoDriver()->draw2DImage(img,dstRect,srcRect,0,0,false);

	}
put in different values for srcRect and the image stretches and scales...
---
Saurav Mohapatra
author, artist and bona fide geek

web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Guest

Post by Guest »

have u tested that code yet?
mohaps
Posts: 248
Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:

Post by mohaps »

yup..the code works like a charm in 0.8
---
Saurav Mohapatra
author, artist and bona fide geek

web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Guest

Post by Guest »

baby i think i love you


lol....

i love your progress bar too... a hint of things to come?
8)

hehe maybe skinnable gui's? lol
Joe_Oliveri
Posts: 448
Joined: Tue Oct 05, 2004 3:24 am
Location: Boston, MA

Post by Joe_Oliveri »

Very nice mohaps! :D looks great, also I like the prefabed sliders. 8)
Irrlicht Moderator || Game Designer
Learn the basics at </dream.in.code>
Post Reply