void Create(string resourceURL)
{
if (resourceURL == null)
{
resourceURL = UIConfig.popupMenu;
if (resourceURL == null)
{
Debug.LogError("FairyGUI: UIConfig.popupMenu not defined");
return;
}
}
_contentPane = UIPackage.CreateObjectFromURL(resourceURL).asCom;
_contentPane.onAddedToStage.Add(__addedToStage);
_contentPane.onRemovedFromStage.Add(__removeFromStage);
_contentPane.focusable = false;
_list = _contentPane.GetChild("list").asList;
_list.RemoveChildrenToPool();
_list.AddRelation(_contentPane, RelationType.Width);
_list.RemoveRelation(_contentPane, RelationType.Height);
_contentPane.AddRelation(_list, RelationType.Height);
_list.onClickItem.Add(__clickItem);
hideOnClickItem = true;
_showSubMenu = __showSubMenu;
_closeSubMenu = CloseSubMenu;
}