I m creating a simple game with intro and game. in Intro sceen the a logo is shown for 5 seconds and than game start. With present sceen the logo remains in the sceen while game is runing.
Code are here :
=========================================
IVideoDriver* driver = idevice->getVideoDriver();
IGUIEnvironment* env = idevice->getGUIEnvironment();
ISceneManager* intro_smgr = idevice->getSceneManager();
IGUISkin* skin = env->getSkin();
IGUIFont* font = env->getFont("../../media/hty.bmp");
if (font)
skin->setFont(font);
skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP);
//= PUTTING LOGO AND EFFECT
IGUIImage* img = env->addImage(
driver->getTexture("../../media/ght.jpg"),
position2d<int>(400,200));
gui::IGUIInOutFader* fader = idevice->getGUIEnvironment()->addInOutFader();
fader->setColor(video::SColor(0,0,0,0));
fader->fadeIn(1500);
//= INTRO MENU LOOP
while(idevice->run() && driver)
{
if (idevice->isWindowActive())
{
updateIrrlicht(idevice);// draw the sceen
}
if(fader->isReady())
{
break;
}
}
idevice->sleep(5000, false); // Pause the sceen for 5 sec
===================================
How could I clear the present screen (with the logo) and than move to the game?
