I've tried a couple with Irrlicht. Started with CEGUI 0.6, which met my needs. It's evolved considerably. I think Sudi posted a working example of librocket on the forums here, which is pretty interesting. Mygui is another.
LordJonas wrote:I'm tring to use CEGUI with Irrlicht but it looks that there is no examples available in the net...
If someone could point me to a piece of code showing how-to use cegui and irrlicht would be nice.
Just checkout the CEGUI examples on how stuff is rendered and how events are handled. Then you should be able to create an irrlicht wrapper for it.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
I just downloaded cegui and it seams it already has an irrlicht renderer.
But that renderer seams to be from 2004. Maybe it works maybe it doesn't who knows. Just try it. besides there are all the other renderers so you can check how to fix it in case it is actually broken.
Example:
-------------------------
// create a renderer which uses the irrlicht filesystem to load data
renderer=new CEGUI::IrrlichtRenderer(device,true);
// create the gui
new CEGUI::System(renderer);
// draw everything
while(device->run())
{
// draw only if the window is active
if (device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(150,50,50,50));
//draw scene
smgr->drawAll();
// draw gui
CEGUI::System::getSingleton().renderGUI();
driver->endScene();
}
}
--------------------------
// irrlicht event handler function
bool CEGuiTest::OnEvent(SEvent event)
{
if(irrlichtrenderer!=0)
return irrlichtrenderer->injectEvent(event);
else
return false;
}
--------------------------
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
LordJonas, Once you get used to coding over WYSIWYG editors you'll realize how much faster it is (I can damn near see the end result before compiling)
If you need the location of something just place a random gui element of the same size and note down the coordinates it ends up at (10,10,600,679 for example)