Game Development Reference
In-Depth Information
Figure 6-2
.
CCControl properties define the minimum and maximum sizes of a CCControl node
Preferred size
should have been named
minimum size
, because it determines the smallest
possible size of a control—in this case, the button. Correspondingly,
Max size
determines
the maximum size, unless it is set to 0 to allow the button's size to grow without limits.
These settings are mainly useful for buttons whose title will change programmatically be-
cause a button's size grows and shrinks with the size of the label printed on it.
User Interaction Enabled
should be self-explanatory. If unchecked, the button will not re-
spond to touches or clicks unless user interaction is enabled programmatically by setting
the
userInteractionEnabled
property to YES. All nodes inherit this property from
CCResponder
, which controls whether the node's custom class will receive touch and ac-
celerometer events.
CCButton Properties
The
CCButton
properties is where you need to apply some editing love. Above all, the
Title
should reflect what the button does; change it to
PAUSE
as seen in
Figure 6-3
.
Ignore the
Localize
check box for now, it will be explained in the “Labels & Localization”
chapter.
Search WWH ::
Custom Search