A Customizable GUI Progressbar for irrlicht
A Customizable GUI Progressbar for irrlicht
Hi All,
as part of the M_TRIX project, here is a demo of a customizable GUI progressbar for Irrlicht.
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.
as part of the M_TRIX project, here is a demo of a customizable GUI progressbar for Irrlicht.
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
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
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
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
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()
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
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
yo guest,
it already is there in irrlicht
put in different values for srcRect and the image stretches and scales...
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);
}
---
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
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
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
-
- Posts: 448
- Joined: Tue Oct 05, 2004 3:24 am
- Location: Boston, MA
Very nice mohaps! looks great, also I like the prefabed sliders.
Irrlicht Moderator || Game Designer
Learn the basics at </dream.in.code>
Learn the basics at </dream.in.code>