mirror of https://github.com/axmolengine/axmol.git
Fixed bugs.
This commit is contained in:
parent
4e2d6143af
commit
fdfa84ce20
|
@ -558,16 +558,12 @@ void WidgetPropertiesReader0250::setPropsForLabelFromJsonDictionary(Widget*widge
|
||||||
{
|
{
|
||||||
label->setFontName(DICTOOL->getStringValue_json(options, "fontName"));
|
label->setFontName(DICTOOL->getStringValue_json(options, "fontName"));
|
||||||
}
|
}
|
||||||
bool handleDimensions = DICTOOL->getBooleanValue_json(options, "handleDimensions");
|
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
|
||||||
if (handleDimensions)
|
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");
|
||||||
|
if (aw && ah)
|
||||||
{
|
{
|
||||||
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
|
Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight"));
|
||||||
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");
|
label->setTextAreaSize(size);
|
||||||
if (aw && ah)
|
|
||||||
{
|
|
||||||
Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight"));
|
|
||||||
label->setTextAreaSize(size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment");
|
bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment");
|
||||||
if (ha)
|
if (ha)
|
||||||
|
@ -1453,16 +1449,12 @@ void WidgetPropertiesReader0300::setPropsForLabelFromJsonDictionary(Widget*widge
|
||||||
{
|
{
|
||||||
label->setFontName(DICTOOL->getStringValue_json(options, "fontName"));
|
label->setFontName(DICTOOL->getStringValue_json(options, "fontName"));
|
||||||
}
|
}
|
||||||
bool handleDimensions = DICTOOL->getBooleanValue_json(options, "handleDimensions");
|
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
|
||||||
if (handleDimensions)
|
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");
|
||||||
|
if (aw && ah)
|
||||||
{
|
{
|
||||||
bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth");
|
Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight"));
|
||||||
bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight");
|
label->setTextAreaSize(size);
|
||||||
if (aw && ah)
|
|
||||||
{
|
|
||||||
Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight"));
|
|
||||||
label->setTextAreaSize(size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment");
|
bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment");
|
||||||
if (ha)
|
if (ha)
|
||||||
|
|
Loading…
Reference in New Issue