Creating a pause menu

First, we will create a pause menu that will present the player with options to resume playing the game, to reset the game to round one, or to quit the application. Begin by going to the UI folder in Content Browser. Right-click on LoseMenu and select the Duplicate option. Rename this new Blueprint Widget to PauseMenu and open it.

Select the text displaying You Lose. Try Again? and, in the Details panel, change the Text field to say Paused…. Change the text color to a color you feel is appropriate for a pause message. Now, select the Restart button's text object, and then change the Text field to Resume.

Next, we will add a third button to allow the player to reset the save file. From the Palette panel, drag down a Button object into Hierarchy, dropping it onto the CanvasPanel object. Rename the button object to the Reset button. Then, drag a Text object down from Palette and drop it onto the Reset button.

Select the text object on the Reset button, and then change the Text field to Reset All. Also, change the font size to 60, the font color to black, and set Justification to center alignment. Now, click on the Reset button object and, in the Details panel, change the Size X field to 400.0 and the Size Y field to 150.0. Next, select the other two buttons and change their X and Y sizes to the same values.

Now, arrange all the three buttons along the center of the canvas, inserting the Reset All button between the Resume and Quit buttons. The final layout should resemble the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset