mirror of https://github.com/axmolengine/axmol.git
Hot fix:Repair some lua test samples and modify layer touch listener functions
This commit is contained in:
parent
ee815c8e9a
commit
a2e9920288
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
||||||
|
6f20ef3b233b2dffcfa11fe289879cfc5ee35d51
|
|
@ -1233,7 +1233,8 @@ local function ExtensionsMainLayer()
|
||||||
item:setPosition(s.width / 2, s.height - i * LINE_SPACE)
|
item:setPosition(s.width / 2, s.height - i * LINE_SPACE)
|
||||||
menu:addChild(item, kItemTagBasic + i)
|
menu:addChild(item, kItemTagBasic + i)
|
||||||
if ((i == ExtensionTestEnum.TEST_WEBSOCKET + 1) and (false == bSupportWebSocket))
|
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)
|
item:setEnabled(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -546,15 +546,15 @@ local function BugsTest()
|
||||||
local ret = cc.Layer:create()
|
local ret = cc.Layer:create()
|
||||||
local function issue1410MenuCallback(tag, pSender)
|
local function issue1410MenuCallback(tag, pSender)
|
||||||
local menu = tolua.cast(pSender:getParent(), "Menu")
|
local menu = tolua.cast(pSender:getParent(), "Menu")
|
||||||
menu:setTouchEnabled(false)
|
menu:setEnabled(false)
|
||||||
menu:setTouchEnabled(true)
|
menu:setEnabled(true)
|
||||||
cclog("NO CRASHES")
|
cclog("NO CRASHES")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function issue1410v2MenuCallback(tag, pSender)
|
local function issue1410v2MenuCallback(tag, pSender)
|
||||||
local menu = tolua.cast(pSender:getParent(), "Menu")
|
local menu = tolua.cast(pSender:getParent(), "Menu")
|
||||||
menu:setTouchEnabled(true)
|
menu:setEnabled(true)
|
||||||
menu:setTouchEnabled(false)
|
menu:setEnabled(false)
|
||||||
cclog("NO CRASHES. AND MENU SHOULD STOP WORKING")
|
cclog("NO CRASHES. AND MENU SHOULD STOP WORKING")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ function UserDefaultTestMain()
|
||||||
local label = cc.LabelTTF:create("UserDefault test see log", "Arial", 28)
|
local label = cc.LabelTTF:create("UserDefault test see log", "Arial", 28)
|
||||||
ret:addChild(label, 0)
|
ret:addChild(label, 0)
|
||||||
label:setPosition( cc.p(s.width/2, s.height-50) )
|
label:setPosition( cc.p(s.width/2, s.height-50) )
|
||||||
|
ret:addChild(CreateBackMenuItem())
|
||||||
doTest()
|
doTest()
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue