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
[SOLVED] Show picture for 1 second
[SOLVED] Show picture for 1 second
Last edited by ibax on Thu Jan 15, 2015 10:56 pm, edited 1 time in total.
Re: Show picture for 1 second
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Show picture for 1 second
And what should be the trigger for comparising the actual time with the old time? Which event should execute the comparison?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.
Re: Show picture for 1 second
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
[SOLVED] Re: Show picture for 1 second
Thanks, it works!!