arbitrary shaped buttons

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
vk239
Posts: 19
Joined: Thu Apr 16, 2009 10:56 pm
Location: Minneapolis

arbitrary shaped buttons

Post by vk239 »

Hi all,
In my game, I'm thinking of having buttons which are rectangles inclined at angles. Will this be possible?

Thanks
==vk>
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

you can always use graphics (textures) for the buttons that you can design like you want... ;)
maybe this thread can give you an idea:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=35924
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Or you could write a custom gui skin which would render the buttons as necessary. Might sound scary but it's really not! You can just take the standard gui skin code from Irrlicht and alter it to fit your needs.
Image Image Image
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

And as far as detecting clicks, it's as equally easy to write your own code, either by manipulating the plan (if you stick to rectangles in 2d) or just plainly check against all relevant triangles.
Post Reply