From e7c833b1d9cd771c1b17395e0f1028fc1e66e982 Mon Sep 17 00:00:00 2001 From: zhaolihang <625335512@qq.com> Date: Tue, 16 Jun 2015 21:28:04 +0800 Subject: [PATCH 1/2] ccs2 support Visible --- quick/framework/cc/uiloader/CCSUILoader2.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/quick/framework/cc/uiloader/CCSUILoader2.lua b/quick/framework/cc/uiloader/CCSUILoader2.lua index 55f2ab9a6980..7e847430ca4c 100644 --- a/quick/framework/cc/uiloader/CCSUILoader2.lua +++ b/quick/framework/cc/uiloader/CCSUILoader2.lua @@ -86,8 +86,14 @@ function CCSUILoader:generateUINode(jsonNode, parent) uiNode:setRotation(jsonNode.Rotation or 0) uiNode:setSkewX(jsonNode.RotationSkewX or 0) uiNode:setSkewY(jsonNode.RotationSkewY or 0) - - -- uiNode:setVisible(jsonNode.visible) -- ccs havn't export visible attribute + + + if jsonNode.VisibleForFrame==nil then --增加 visible 参数 + jsonNode.visible=true + else + jsonNode.visible=jsonNode.VisibleForFrame + end + uiNode:setVisible(jsonNode.visible) -- ccs visible attribute if jsonNode.Scale then uiNode:setScaleX((jsonNode.Scale.ScaleX or 1) * uiNode:getScaleX()) uiNode:setScaleY((jsonNode.Scale.ScaleY or 1) * uiNode:getScaleY()) From b51c5eb6a70eae8b5ec7a58907febb18cdfd52a3 Mon Sep 17 00:00:00 2001 From: zhaolihang-hp <625335512@qq.com> Date: Thu, 18 Jun 2015 09:26:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?the=20=20=5FdefaultResRootPath=20=20=20shou?= =?UTF-8?q?ld=20addSearchPath=20=E6=94=B9=E5=8F=98=E4=BA=86=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=9A=84=E8=B5=84=E6=BA=90=E8=B7=AF=E5=BE=84=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E8=AF=A5=E5=8A=A0=E5=88=B0=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cocos/platform/CCFileUtils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp index 687065359dcd..c91b95a4efe3 100644 --- a/cocos/platform/CCFileUtils.cpp +++ b/cocos/platform/CCFileUtils.cpp @@ -846,6 +846,7 @@ void FileUtils::setWritablePath(const std::string& writablePath) void FileUtils::setDefaultResourceRootPath(const std::string& path) { _defaultResRootPath = path; + this->addSearchPath(_defaultResRootPath,true); } void FileUtils::setSearchPaths(const std::vector& searchPaths)