patch to put background images on gui elements.

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
m4rvin
Posts: 32
Joined: Tue May 15, 2007 3:00 am
Contact:

patch to put background images on gui elements.

Post by m4rvin »

the graphics are taken from yahoo.

Image

Code: Select all

img = env->addImage(driver->getTexture("skin/frame.png"), position2d<s32>(0, 0));
img->setImageExtend(16, 34, 16, 20);
skin->setBackgroundImage(EGBI_WINDOW, img);
skin->setMargin(EGBI_WINDOW, core::rect<s32>(6, 6, 6, 6));
several frames slower than the normal gradient skins. but looks nice.

warning: the patch has a lot of hacks. the formatting tool i used (astyle) also dirtied up the patch on some files

http://lifeinfogems.com/dev/irr/irr0530.patch
Virion
Competition winner
Posts: 2149
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

holy... looks great!
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
lester
Posts: 86
Joined: Mon Jan 29, 2007 3:33 pm

Post by lester »

WOW! That stuff rocks!
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Irrlicht looks better than Vista :lol:


Beryl is another story though :P
Virion
Competition winner
Posts: 2149
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Irrlicht looks better than Vista
Indeed! :lol:
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
Virion
Competition winner
Posts: 2149
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Anyway, does the [x] buttons work in the gui?
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
m4rvin
Posts: 32
Joined: Tue May 15, 2007 3:00 am
Contact:

Post by m4rvin »

yup, everything works as it should.
Virion
Competition winner
Posts: 2149
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

has this been added into the irrlicht core?
Last edited by Virion on Thu Jun 07, 2007 5:46 am, edited 1 time in total.
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

no i doubt it, someone from the dev team should take a look at it.

Has it been submitted to the tracker?
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

ya the style looks very professional like vista and i think it is easy to plug it in the irrlicht engine in the 1.4 release
m4rvin
Posts: 32
Joined: Tue May 15, 2007 3:00 am
Contact:

Post by m4rvin »

it would only work with my patch above.. i doubt you'd like to use it regularly though, too make unelegant hacks :D

but maybe the team could take a look at the code and add the same features

umm. tracker? sorry... i'm a bit new
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Please avoid the reindentation to make the patch as small as possible. Moreover check that the new images don't collide or overlap (conceptually) with those already possible for buttons.
You can submit the patch to the tracker on the Irrlicht project page at SourceForge.
Last edited by hybrid on Thu Jun 07, 2007 9:19 am, edited 1 time in total.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

m4rvin, looks nice.

P.S.:

Indeed that would be great for Irrlicht to have 2 things:
1) gradient GUI style (actually it already has);
2) texture GUI style

:)
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

yeah looking nice :)
a full texture skin would be pretty cool, someone made one once but it didn't have nice round edges like this one.
however, i'd like to make a flexible one that uses IGUISprites to store the edges.. but I guess first we need a sprite editor, IGUISprite to support masks for clicking (for round edges), and also to transfer all the clicking stuff over to the skin (so 3d skins are possible)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
smartwhiz
Posts: 120
Joined: Wed Jan 14, 2004 6:03 pm
Location: India

Post by smartwhiz »

eh.. just a single doubt for the noob.. well how do i patch the patch ???
as frm the codes in the patch file.. i hope a recompiling of the engine is necessary!!
Thanks and With Regards
Smartwhiz
Post Reply