mirror of https://github.com/axmolengine/axmol.git
Update that sets default value of font name for ButtonReader, TextFieldReader, TextReader
This commit is contained in:
parent
6b6fe4129d
commit
e81dca372a
|
@ -232,7 +232,7 @@ namespace cocostudio
|
||||||
button->setTitleFontSize(DICTOOL->getIntValue_json(options, P_FontSize,14));
|
button->setTitleFontSize(DICTOOL->getIntValue_json(options, P_FontSize,14));
|
||||||
|
|
||||||
|
|
||||||
button->setTitleFontName(DICTOOL->getStringValue_json(options, P_FontName));
|
button->setTitleFontName(DICTOOL->getStringValue_json(options, P_FontName, ""));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace cocostudio
|
||||||
textField->setFontSize(DICTOOL->getIntValue_json(options, P_FontSize,20));
|
textField->setFontSize(DICTOOL->getIntValue_json(options, P_FontSize,20));
|
||||||
|
|
||||||
|
|
||||||
textField->setFontName(DICTOOL->getStringValue_json(options, P_FontName));
|
textField->setFontName(DICTOOL->getStringValue_json(options, P_FontName, ""));
|
||||||
|
|
||||||
bool tsw = DICTOOL->checkObjectExist_json(options, P_TouchSizeWidth);
|
bool tsw = DICTOOL->checkObjectExist_json(options, P_TouchSizeWidth);
|
||||||
bool tsh = DICTOOL->checkObjectExist_json(options, P_TouchSizeHeight);
|
bool tsh = DICTOOL->checkObjectExist_json(options, P_TouchSizeHeight);
|
||||||
|
|
|
@ -111,7 +111,7 @@ namespace cocostudio
|
||||||
|
|
||||||
label->setFontSize(DICTOOL->getIntValue_json(options, P_FontSize,20));
|
label->setFontSize(DICTOOL->getIntValue_json(options, P_FontSize,20));
|
||||||
|
|
||||||
std::string fontName = DICTOOL->getStringValue_json(options, P_FontName);
|
std::string fontName = DICTOOL->getStringValue_json(options, P_FontName, "");
|
||||||
|
|
||||||
std::string fontFilePath = jsonPath.append(fontName);
|
std::string fontFilePath = jsonPath.append(fontName);
|
||||||
if (FileUtils::getInstance()->isFileExist(fontFilePath))
|
if (FileUtils::getInstance()->isFileExist(fontFilePath))
|
||||||
|
|
Loading…
Reference in New Issue