Game Development Reference
In-Depth Information
Tip
If you're having difficulty seeing the sprite image since it's pretty dark, go
to Document
Stage Color and select a different background color for the
stage.
You have to use % positions for all following nodes as well. The actual layout of labels
and buttons is up to you, it's only important to make all nodes in the layer children of the
background sprite so that their positions are always relative to the background sprite's
lower left corner rather than relative to the screen's lower left corner. This allows you to
move the sprites along with the background if you ever decide that the background
shouldn't be centered but rather offset a little.
Add a
Label TTF
from the
Node Library View
, make it a child of the
P_bg
sprite, and
change its position types to
%
. Drag and move it to where you like. Oh, and change the
Label text
field to something like
Game Paused
. You may also want to pick a different
font or change the font size.
Proceed by adding three
Button
nodes, one after another, from the
Node Library View
.
Make those children of the
P_bg
sprite, and change their position types to
%
as well.
Then move them to appropriate locations. See
Figure 6-6
for a possible result.
Figure 6-6
.
The completed PauseMenuLayer.ccb
For each button, perform the following steps on the
Item Properties
tab:
Search WWH ::
Custom Search