[SOLVED] Show picture for 1 second

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
ibax
Posts: 193
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary
Contact:

[SOLVED] Show picture for 1 second

Post by ibax »

Hi all,

I would like to show a picture for exactly one second. After one second, the picture should automatically disappear...
Is it possible somehow to show a picture only for the given seconds? It is also OK for me, if we do the "setVisible(true) <> setVisible(false)" changing, the question is the timing...

Thx
Last edited by ibax on Thu Jan 15, 2015 10:56 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Show picture for 1 second

Post by CuteAlien »

Remember the time when you start showing it. Compare the current time with the old time and if it's larger than 1 second then hide it again.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
ibax
Posts: 193
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary
Contact:

Re: Show picture for 1 second

Post by ibax »

CuteAlien wrote:Remember the time when you start showing it. Compare the current time with the old time and if it's larger than 1 second then hide it again.
And what should be the trigger for comparising the actual time with the old time? Which event should execute the comparison?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Show picture for 1 second

Post by CuteAlien »

There is no trigger. You do that in your main-loop.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
ibax
Posts: 193
Joined: Thu Jun 21, 2007 8:56 am
Location: hungary
Contact:

[SOLVED] Re: Show picture for 1 second

Post by ibax »

Thanks, it works!!
Post Reply