--------------------------- Button控件按钮使用 -----------------------------------------
--lua 中 Button按钮控件处理方式
--Button 触摸处理函数
local function TouchDownAction()
if self.simulateDataLayer:isVisible() then
print("Simulate Data is show")
self.simulateDataLayer:setVisible(false)
else
print("Simulate Data is not show")
self.simulateDataLayer:setVisible(true)
end
end
-- Button 按钮控件 添加模似数据所模块功能
local bgBtn = cc.Scale9Sprite:create("Shell_1.png")
local bgBtnHighLight = cc.Scale9Sprite:create("ball.png")
local titleBtnLabel = cc.Label:createWithSystemFont("SimulateData", "Marker Felt", 30)
titleBtnLabel:setColor(cc.c3b(159,168,175))
local controlButton = cc.ControlButton:create(titleBtnLabel, bgBtn)
controlButton:setBackgroundSpriteForState(bgBtnHighLight,cc.CONTROL_STATE_HIGH_LIGH