modify nodeReader to support LabelAtlas and LabelBMFont

This commit is contained in:
andyque 2014-07-01 10:11:36 +08:00
parent 00695eed49
commit 4e63a3da7d
2 changed files with 11 additions and 5 deletions

View File

@ -45,6 +45,8 @@ static const char* ClassName_Button = "Button";
static const char* ClassName_CheckBox = "CheckBox";
static const char* ClassName_ImageView = "ImageView";
static const char* ClassName_TextAtlas = "TextAtlas";
static const char* ClassName_LabelAtlas = "LabelAtlas";
static const char* ClassName_LabelBMFont= "LabelBMFont";
static const char* ClassName_TextBMFont = "TextBMFont";
static const char* ClassName_Text = "Text";
static const char* ClassName_LoadingBar = "LoadingBar";
@ -132,7 +134,8 @@ void NodeReader::init()
_funcs.insert(Pair(ClassName_SubGraph, std::bind(&NodeReader::loadSubGraph, this, _1)));
_funcs.insert(Pair(ClassName_Sprite, std::bind(&NodeReader::loadSprite, this, _1)));
_funcs.insert(Pair(ClassName_Particle, std::bind(&NodeReader::loadParticle, this, _1)));
_funcs.insert(Pair(ClassName_LabelAtlas,std::bind(&NodeReader::loadWidget, this, _1)));
_funcs.insert(Pair(ClassName_LabelBMFont,std::bind(&NodeReader::loadWidget, this, _1)));
_funcs.insert(Pair(ClassName_Panel, std::bind(&NodeReader::loadWidget, this, _1)));
_funcs.insert(Pair(ClassName_Button, std::bind(&NodeReader::loadWidget, this, _1)));
_funcs.insert(Pair(ClassName_CheckBox, std::bind(&NodeReader::loadWidget, this, _1)));

View File

@ -622,11 +622,14 @@ bool TextField::isPasswordEnabled()const
void TextField::setPasswordStyleText(const char *styleText)
{
_textFieldRenderer->setPasswordStyleText(styleText);
if (nullptr != styleText) {
_textFieldRenderer->setPasswordStyleText(styleText);
_passwordStyleText = styleText;
setText(getStringValue());
}
_passwordStyleText = styleText;
setText(getStringValue());
}
const char* TextField::getPasswordStyleText()const