Using pushDialog() and popDialog() and setting up the UI file to work with them
There are times when we want to present to the user additional information that is overlaid on the current screen. This could take, for
example, the form of a window with a Yes or No question that the user needs to answer for the game. In this recipe, we will create a new GuiWindowCtrl
control that we will present to the user over the top of the current screen content, and have this window dismissed when the user clicks on a button.
Getting ready
For this recipe we will be working with the GUI Editor. We begin by starting up our game (such as the one built using the Full
template) and at the Main Menu section, pressing F10 to launch the GUI Editor.
How to do it...
In the following steps we will create a new dialog window and display it to the user:
From the File menu, choose New Gui. This will open the Create new GUI dialog box.
Within the GUI Name field enter a name as
DialogTest
.Make sure that the GUI Class drop...