void UI_List::InitAttribute(Ref<XMLNode> node,ScriptInstance* self) { UI_Box::InitAttribute(node, self); Vector<Variant> array = node->get_attributes(); for(unsigned i = 0;i<array.size();i++){ Ref<XMLAttribute> attribute = array[i]; String tag = attribute->name().to_lower(); if (tag == "repeatx") { SetRepeatX(attribute->value().to_int()); } else if (tag == "repeaty") { SetRepeatY(attribute->value().to_int()); } else if (tag == "spacex") { SetSpaceX(attribute->value().to_int()); } else if (tag == "spacey") { SetSpaceY(attribute->value().to_int()); } /* if (tag == "skin") { SetSkin(attribute->value()); } else if (tag == "sizegrid") { SetSizeGrid(attribute->value()); } else if (tag == "clipx") { SetClipX(attribute->value().to_int()); } else if (tag == "clipy") { SetClipY(attribute->value().to_int()); } else if (tag == "labels") { SetLabels(attribute->value()); } else if (tag == "selectedindex") { SetSelectedIndex(attribute->value().to_int()); } else if (tag == "direction") { SetDirection(attribute->value()); } else if (tag == "space") { SetSpace(attribute->value().to_int()); } */ } }
void nuiImageDecoration::SetTexturePath(nglPath path) { SetProperty(_T("Texture"), path.GetPathName()); nuiTexture* pOld = mpTexture; mpTexture = nuiTexture::GetTexture(path); if (!mpTexture || !mpTexture->IsValid()) { NGL_OUT(_T("nuiImageDecoration::SetTexturePath warning : could not load graphic resource '%ls'\n"), path.GetChars()); return; } if (GetSourceClientRect() == nuiRect(0,0,0,0)) SetSourceClientRect(nuiRect(0, 0, mpTexture->GetWidth(), mpTexture->GetHeight())); if (pOld) pOld->Release(); SetRepeatX(mRepeatX); SetRepeatY(mRepeatY); Changed(); }