Redraw the screen?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bapi
Posts: 33
Joined: Fri Apr 04, 2008 1:57 pm
Location: India
Contact:

Redraw the screen?

Post by bapi »

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?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

remove the gui image when it's no longer necessary... check the API/docs and you'd know how to remove it ;)
Image Image Image
bapi
Posts: 33
Joined: Fri Apr 04, 2008 1:57 pm
Location: India
Contact:

Post by bapi »

That very easy !

Thank !
Post Reply