【一】:创建:
1.方法:
(1):CCControlButton::create("CCScale9Sprite背景对象");
(2):CCControlButton::create("CCLabelTTF对象","CCScale9Sprite背景对象");
【二】:函数:
//当按钮响应对应事件后的CCScale9Sprite对象
setBackgroundSpriteForState("新的CCScale9Sprite对象","CCControlState状态变量");
//当按钮响应对应事件后的文字颜色
setTitleColorForState("新的ccColor3B颜色","CCControlState状态变量");
//当按钮响应对应事件后的文本
setTitleForState("新的CCString对象","CCControlState状态变量");
CCControlState状态变量如下(就是说处于这个状态才调用):
CCControlStateDisabled //禁用
CCControlStateHighlighted //高亮
CCControlStateNormal //正常
CCControlStateSelected //被XX过后 (感谢 北京|殁如雪 同学的解释)
CCControlState事件如下:
CCControlEvenTouchDown &nb