Merge pull request #9431 from pipu/update_widget_reader_and_actiontimeline_reader

Update some widget reader and action time line reader
This commit is contained in:
minggo 2014-12-09 18:21:56 +08:00
commit 734a378272
7 changed files with 46 additions and 2 deletions

View File

@ -668,6 +668,9 @@ Frame* ActionTimelineCache::loadColorFrameWithFlatBuffers(const flatbuffers::Tim
Color3B color(f_color->r(), f_color->g(), f_color->b());
frame->setColor(color);
int alpha = f_color->a();
frame->setAlpha(alpha);
int frameIndex = flatbuffers->frameIndex();
frame->setFrameIndex(frameIndex);

View File

@ -617,6 +617,15 @@ namespace cocostudio
Size scale9Size(f_scale9Size->width(), f_scale9Size->height());
panel->setContentSize(scale9Size);
}
else
{
auto widgetOptions = options->widgetOptions();
if (!panel->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());
panel->setContentSize(contentSize);
}
}
auto widgetOptions = options->widgetOptions();
auto f_color = widgetOptions->color();

View File

@ -491,6 +491,15 @@ namespace cocostudio
Size scale9Size(f_scale9Size->width(), f_scale9Size->height());
listView->setContentSize(scale9Size);
}
else
{
auto widgetOptions = options->widgetOptions();
if (!listView->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());
listView->setContentSize(contentSize);
}
}
auto widgetOptions = options->widgetOptions();
auto f_color = widgetOptions->color();
@ -519,6 +528,11 @@ namespace cocostudio
auto widgetReader = WidgetReader::getInstance();
widgetReader->setPropsWithFlatBuffers(node, (Table*)options->widgetOptions());
if (!listView->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());
listView->setContentSize(contentSize);
}
}
Node* ListViewReader::createNodeWithFlatBuffers(const flatbuffers::Table *listViewOptions)

View File

@ -358,6 +358,15 @@ namespace cocostudio
Size scale9Size(f_scale9Size->width(), f_scale9Size->height());
pageView->setContentSize(scale9Size);
}
else
{
auto widgetOptions = options->widgetOptions();
if (!pageView->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());
pageView->setContentSize(contentSize);
}
}
auto widgetOptions = options->widgetOptions();
auto f_color = widgetOptions->color();

View File

@ -444,6 +444,15 @@ namespace cocostudio
Size scale9Size(f_scale9Size->width(), f_scale9Size->height());
scrollView->setContentSize(scale9Size);
}
else
{
auto widgetOptions = options->widgetOptions();
if (!scrollView->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());
scrollView->setContentSize(contentSize);
}
}
auto widgetOptions = options->widgetOptions();
auto f_color = widgetOptions->color();

View File

@ -316,7 +316,7 @@ namespace cocostudio
auto widgetReader = WidgetReader::getInstance();
widgetReader->setPropsWithFlatBuffers(node, (Table*)options->widgetOptions());
const WidgetOptions* widgetOptions = options->widgetOptions();
auto widgetOptions = options->widgetOptions();
if (!textField->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());

View File

@ -330,7 +330,7 @@ namespace cocostudio
auto widgetReader = WidgetReader::getInstance();
widgetReader->setPropsWithFlatBuffers(node, (Table*)options->widgetOptions());
const WidgetOptions* widgetOptions = options->widgetOptions();
auto widgetOptions = options->widgetOptions();
if (!label->isIgnoreContentAdaptWithSize())
{
Size contentSize(widgetOptions->size()->width(), widgetOptions->size()->height());