Ejemplo n.º 1
0
void UIListViewEx::copyClonedWidgetChildren(UIWidget* model)
{
    ccArray* arrayItems = dynamic_cast<UIListViewEx*>(model)->getItems()->data;
    int length = arrayItems->num;
    for (int i=0; i<length; i++)
    {
        UIWidget* item = (UIWidget*)(arrayItems->arr[i]);
        pushBackCustomItem(item->clone());
    }
}
Ejemplo n.º 2
0
void UIWidget::copyClonedWidgetChildren(UIWidget* model)
{
    cocos2d::ccArray* arrayWidgetChildren = model->getChildren()->data;
    int length = arrayWidgetChildren->num;
    for (int i=0; i<length; i++)
    {
        UIWidget* child = (UIWidget*)(arrayWidgetChildren->arr[i]);
        addChild(child->clone());
    }
}