Hot fix:Repair some lua test samples and modify layer touch listener functions

This commit is contained in:
samuele3 2013-11-18 22:16:49 +08:00
parent ee815c8e9a
commit a2e9920288
5 changed files with 8 additions and 3564 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
6f20ef3b233b2dffcfa11fe289879cfc5ee35d51

View File

@ -1233,7 +1233,8 @@ local function ExtensionsMainLayer()
item:setPosition(s.width / 2, s.height - i * LINE_SPACE)
menu:addChild(item, kItemTagBasic + i)
if ((i == ExtensionTestEnum.TEST_WEBSOCKET + 1) and (false == bSupportWebSocket))
or ((i == ExtensionTestEnum.TEST_EDITBOX + 1) and (false == bSupportEdit)) then
or ((i == ExtensionTestEnum.TEST_EDITBOX + 1) and (false == bSupportEdit))
or (i == ExtensionTestEnum.TEST_NOTIFICATIONCENTER + 1)then
item:setEnabled(false)
end
end

View File

@ -546,15 +546,15 @@ local function BugsTest()
local ret = cc.Layer:create()
local function issue1410MenuCallback(tag, pSender)
local menu = tolua.cast(pSender:getParent(), "Menu")
menu:setTouchEnabled(false)
menu:setTouchEnabled(true)
menu:setEnabled(false)
menu:setEnabled(true)
cclog("NO CRASHES")
end
local function issue1410v2MenuCallback(tag, pSender)
local menu = tolua.cast(pSender:getParent(), "Menu")
menu:setTouchEnabled(true)
menu:setTouchEnabled(false)
menu:setEnabled(true)
menu:setEnabled(false)
cclog("NO CRASHES. AND MENU SHOULD STOP WORKING")
end

View File

@ -75,6 +75,7 @@ function UserDefaultTestMain()
local label = cc.LabelTTF:create("UserDefault test see log", "Arial", 28)
ret:addChild(label, 0)
label:setPosition( cc.p(s.width/2, s.height-50) )
ret:addChild(CreateBackMenuItem())
doTest()
return ret
end