public PackageItem getBranch() { if (branches != null && owner._branchIndex != -1) { string itemId = branches[owner._branchIndex]; if (itemId != null) { return(owner.GetItem(itemId)); } } return(this); }
public static PackageItem GetItemByURL(string url) { if (url.Length > 13) { string pkgId = url.Substring(5, 8); string srcId = url.Substring(13); UIPackage pkg = GetById(pkgId); if (pkg != null) return pkg.GetItem(srcId); } return null; }
static public int GetItem(IntPtr l) { try { FairyGUI.UIPackage self = (FairyGUI.UIPackage)checkSelf(l); System.String a1; checkType(l, 2, out a1); var ret = self.GetItem(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static int GetItem(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.UIPackage obj = (FairyGUI.UIPackage)ToLua.CheckObject <FairyGUI.UIPackage>(L, 1); string arg0 = ToLua.CheckString(L, 2); FairyGUI.PackageItem o = obj.GetItem(arg0); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static PackageItem GetItemByURL(string url) { if (url == null) { return(null); } int pos1 = url.IndexOf("//"); if (pos1 == -1) { return(null); } int pos2 = url.IndexOf('/', pos1 + 2); if (pos2 == -1) { if (url.Length > 13) { string pkgId = url.Substring(5, 8); UIPackage pkg = GetById(pkgId); if (pkg != null) { string srcId = url.Substring(13); return(pkg.GetItem(srcId)); } } } else { string pkgName = url.Substring(pos1 + 2, pos2 - pos1 - 2); UIPackage pkg = GetByName(pkgName); if (pkg != null) { string srcName = url.Substring(pos2 + 1); return(pkg.GetItemByName(srcName)); } } return(null); }