Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check
the Wiki
mohaps
Posts: 248 Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:
Post
by mohaps » Mon Mar 07, 2005 11:04 pm
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.
---
Saurav Mohapatra
author, artist and bona fide geek
web:
http://www.mohaps.com
email: mohaps AT gmail DOT com
Guest
Post
by Guest » Mon Mar 07, 2005 11:19 pm
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 » Mon Mar 07, 2005 11:23 pm
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 » Mon Mar 07, 2005 11:29 pm
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 » Mon Mar 07, 2005 11:31 pm
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 » Mon Mar 07, 2005 11:32 pm
ur a beast
mohaps
Posts: 248 Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:
Post
by mohaps » Mon Mar 07, 2005 11:59 pm
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 » Tue Mar 08, 2005 1:48 am
have u tested that code yet?
mohaps
Posts: 248 Joined: Tue Jun 08, 2004 1:54 pm
Location: Shrewsbury MA
Contact:
Post
by mohaps » Tue Mar 08, 2005 3:27 am
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 » Tue Mar 08, 2005 5:18 am
baby i think i love you
lol....
i love your progress bar too... a hint of things to come?
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 » Tue Mar 08, 2005 5:57 am
Very nice mohaps!
looks great, also I like the prefabed sliders.