Trigger Event at startup

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
KrisG
Posts: 6
Joined: Wed Jul 16, 2014 9:23 pm

Trigger Event at startup

Post by KrisG »

Hello Community.

Simple question. I have a lot of GUI creation in my event handler (I'm going off the tutorial Mesh Viewer). My event handler is a bit more robust than that example, and a lot of things that I need to create on my GUI also need to happen if triggered by an event. Is there a way to trigger those events in the main method so I don't have to write the code twice?
CuteAlien
Admin
Posts: 9930
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Trigger Event at startup

Post by CuteAlien »

The eventreceiver is your own class. As with every class in c++ you can add any functions and pass any parameters you want to it.
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
Post Reply