Hi, thanks very much for your reply.
I'm glad to hear those threads aren't necessary, I totally don't want to use that stuff^^
My Problem just is, he uses a big class with a run function containing an event loop (which, when running, my other code wouldn't be executed) and you can't just write a callback function without a class, because the the compiler will see it and say "What the *** is a button?", because I first create that button widget in main(), so something like
// Pseudocode
callback()
{
button->SetLabel("Peace");
}
main()
auto button = createButton()
button->GetSignal.connect(std::bind(callback()));
won't compile
Say I have a main menu and a little window with different options ingame, like a HUD, do I just write to classes for the menu and for the HUD and depending on the state, run the appropriate one? Ok, however,
how do I run the HUD class and still have my normal game loop? I can't do
main()
Hud.run(); // This enters an loop which goes as long as my application is running
Game.run(); // so this basically never executes