Hi again,
Thanks. I will try to re-use the RenderWindow.
My application has a main window, and a button for starting a "Setup" window. So what is then the best procedure?
A: Creating a new RenderWindow and a new Gui, as I am doing now
B: Re-using the RenderWindow with a new Gui.
The change in my code will then be to let the "Back" (or "OK") button just set a "Finish" flag,
instead of, as now, closing the RenderWindow.
C: Other method?
Ingar
Thanks. I will try to re-use the RenderWindow.
My application has a main window, and a button for starting a "Setup" window. So what is then the best procedure?
A: Creating a new RenderWindow and a new Gui, as I am doing now
B: Re-using the RenderWindow with a new Gui.
The change in my code will then be to let the "Back" (or "OK") button just set a "Finish" flag,
instead of, as now, closing the RenderWindow.
C: Other method?
Ingar
Quote from: texus on 30 April 2019, 15:57:19
tgui::Gui just keeps a pointer to the RenderWindow, it will not destroy the window when the Gui gets destroyed. You only have to make sure not to call functions on the Gui object after the window it uses has been destroyed.
Why do you need a second sf::RenderWindow? Can't you just continue to use the existing window? If you really need a second window then you also need a second Gui that renders to that window.