Hello all,
I wanted to know, if there is a possibility to create one's own GUI elements in the irrlicht engine.
I have searched for tutorials or some other help but haven't find anything.
So, I would be glad, if someone could help me.
WhiteMike
create own GUI elements
I've been working on this idea too.
Here's an example from the FAQs forum.
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8252
Here's an example from the FAQs forum.
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8252
Yes it it possible and its fairly easy. You just need to inherite from IGUIElement or some of the IGUI elements like IGUIButton for example.
Your code should look like:
To create your element:
Your code should look like:
Code: Select all
class CustomGUIelement : public gui::IGUIElement
{
... then overwrite all virtual IGUIElement functions and add your own
};
Code: Select all
CustomGUIelement *element = new CustomGUIelement (guienv, guienv->getRootGUIElement(), 0, core::rect<s32>(0,0,160,10));
element->drop();