//-------------------------------------------------------------------------------------------- // 点击游戏列表 void OnClickGameList(TglItem itm, UIToggleCtrl frm) { //if (itm.mbSel) { GamePackUI gm = null; string sGm = ArchiveUtil.GetLastPath(itm.mName); mGameRes.TryGetValue(sGm.ToLower(), out gm); if (gm != mpSelGM) { mpSelGM = gm; } } }
void NtfRefreshPathFromConfig() { mPthCtrl.ResetCtrl(); try { TextAsset txt = Resources.Load("Versions/PackageFolder") as TextAsset; string[] fileList = txt.text.Split(new char[] { '\r', '\n' }, System.StringSplitOptions.RemoveEmptyEntries); foreach (string n in fileList) { string[] fileAndArg = n.Split(new char[] { '|' }, System.StringSplitOptions.RemoveEmptyEntries); if (fileAndArg != null && fileAndArg.Length > 0) { TglItem item = null; item = new TglItem(true, fileAndArg[0], false); item.m_viewText = item.mName; for (int i = 1; i < fileAndArg.Length; i++) { if (fileAndArg[i] == "*") { item.mIsPackedEachFile = true; item.m_viewText = item.m_viewText + "---[Each]"; } else if (fileAndArg[i] == "A") { item.m_isPackedAlive = true; item.m_viewText = item.m_viewText + "---[KeepAlive]"; } else if (fileAndArg[i] == "E") { item.m_isPackedExtern = true; item.m_viewText = item.m_viewText + "---[Extern]"; } } mPthCtrl.AddItem(item); } else { mPthCtrl.AddItem(new TglItem(true, n)); } } } catch (System.Exception) { } }
public void AddItem(TglItem itm) { mItmAry.Add(itm); }