mirror of https://github.com/axmolengine/axmol.git
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:
commit
734a378272
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue