diff --git a/cocos/editor-support/cocostudio/CCBone.cpp b/cocos/editor-support/cocostudio/CCBone.cpp index 4b217141b5..45ac09416b 100644 --- a/cocos/editor-support/cocostudio/CCBone.cpp +++ b/cocos/editor-support/cocostudio/CCBone.cpp @@ -257,13 +257,17 @@ void Bone::setBlendFunc(const BlendFunc& blendFunc) void Bone::updateDisplayedColor(const Color3B &parentColor) { +#ifdef CC_STUDIO_ENABLED_VIEW _realColor = Color3B(255, 255, 255); +#endif // CC_STUDIO_ENABLED_VIEW Node::updateDisplayedColor(parentColor); } void Bone::updateDisplayedOpacity(GLubyte parentOpacity) { +#ifdef CC_STUDIO_ENABLED_VIEW _realOpacity = 255; +#endif // CC_STUDIO_ENABLED_VIEW Node::updateDisplayedOpacity(parentOpacity); } diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index e7701289f8..863349ab91 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -764,7 +764,11 @@ void WidgetPropertiesReader0250::setPropsForButtonFromJsonDictionary(Widget*widg bool fn = DICTOOL->checkObjectExist_json(options, "fontName"); if (fn) { - button->setTitleFontName(DICTOOL->getStringValue_json(options, "fontName")); + const char * szTemp = DICTOOL->getStringValue_json(options, "fontName"); + if (szTemp && *szTemp) + button->setTitleFontName(szTemp); + else + button->setTitleFontName(std::string("")); } setColorPropsForWidgetFromJsonDictionary(widget,options); } @@ -882,7 +886,11 @@ void WidgetPropertiesReader0250::setPropsForLabelFromJsonDictionary(Widget*widge bool fn = DICTOOL->checkObjectExist_json(options, "fontName"); if (fn) { - label->setFontName(DICTOOL->getStringValue_json(options, "fontName")); + const char * szTemp = DICTOOL->getStringValue_json(options, "fontName"); + if (szTemp && *szTemp) + label->setFontName(szTemp); + else + label->setFontName(std::string("")); } bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); @@ -1105,7 +1113,11 @@ void WidgetPropertiesReader0250::setPropsForTextFieldFromJsonDictionary(Widget*w bool fn = DICTOOL->checkObjectExist_json(options, "fontName"); if (fn) { - textField->setFontName(DICTOOL->getStringValue_json(options, "fontName")); + const char * szTemp = DICTOOL->getStringValue_json(options, "fontName"); + if (szTemp && *szTemp) + textField->setFontName(szTemp); + else + textField->setFontName(std::string("")); } bool tsw = DICTOOL->checkObjectExist_json(options, "touchSizeWidth"); bool tsh = DICTOOL->checkObjectExist_json(options, "touchSizeHeight");