override public void Setup_AfterAdd(XML cxml)
{
base.Setup_AfterAdd(cxml);
if (_downEffect == 2)
{
this.SetPivot(0.5f, 0.5f);
}
XML xml = cxml.GetNode("Button");
if (xml == null)
{
this.title = string.Empty;
this.icon = null;
return;
}
string str;
this.title = xml.GetAttribute("title");
this.icon = xml.GetAttribute("icon");
str = xml.GetAttribute("selectedTitle");
if (str != null)
{
this.selectedTitle = str;
}
str = xml.GetAttribute("selectedIcon");
if (str != null)
{
this.selectedIcon = str;
}
str = xml.GetAttribute("titleColor");
if (str != null)
{
this.titleColor = ToolSet.ConvertFromHtmlColor(str);
}
str = xml.GetAttribute("controller");
if (str != null)
{
_relatedController = parent.GetController(str);
}
pageOption.id = xml.GetAttribute("page");
this.selected = xml.GetAttributeBool("checked", false);
str = xml.GetAttribute("sound");
if (str != null)
{
sound = UIPackage.GetItemAssetByURL(str) as AudioClip;
}
str = xml.GetAttribute("volume");
if (str != null)
{
soundVolumeScale = float.Parse(str) / 100f;
}
}