Merge pull request #7305 from andyque/fixLayoutReader

fix layout background image default color & opacity
This commit is contained in:
minggo 2014-07-03 17:16:56 +08:00
commit eb97b9ad45
1 changed files with 6 additions and 3 deletions

View File

@ -290,11 +290,14 @@ namespace cocostudio
panel->setLayoutType((Layout::Type)DICTOOL->getIntValue_json(options, P_LayoutType));
int bgimgcr = DICTOOL->getIntValue_json(options, P_ColorR);
int bgimgcg = DICTOOL->getIntValue_json(options, P_ColorG);
int bgimgcb = DICTOOL->getIntValue_json(options, P_ColorB);
int bgimgcr = DICTOOL->getIntValue_json(options, P_ColorR,255);
int bgimgcg = DICTOOL->getIntValue_json(options, P_ColorG,255);
int bgimgcb = DICTOOL->getIntValue_json(options, P_ColorB,255);
panel->setBackGroundImageColor(Color3B(bgimgcr, bgimgcg, bgimgcb));
int bgimgopacity = DICTOOL->getIntValue_json(options, "opacity",255);
panel->setBackGroundImageOpacity(bgimgopacity);
WidgetReader::setColorPropsFromJsonDictionary(widget, options);
}