public static void onShowPanel(CLPanelBase panel) { if (panel == null) { return; } showingPanels[panel.gameObject.name] = panel; panelCacheQueue.Remove(panel); panelCacheQueue.Insert(0, panel); CLPanelBase bottomPanel = null; if (panelCacheQueue.Count > self.cachePanelSize) { bottomPanel = (panelCacheQueue[panelCacheQueue.Count - 1]) as CLPanelBase; panelCacheQueue.RemoveAt(panelCacheQueue.Count - 1); if (bottomPanel.destroyWhenHide) { if (!bottomPanel.isActive && !CLPanelManager.panelRetainLayer.Contains(bottomPanel)) { //虽然页面是关掉了,但是如果还是在panelRetainLayer里,则不能删除,因为当关掉顶层页面时,这个页面还是会被打开 CLPanelManager.destroyPanel(bottomPanel, false); } } } }
public static void onGetCalenderPanel(params object[] orgs) { CLPanelBase p = orgs [0] as CLPanelBase; ArrayList list = orgs [1] as ArrayList; if (p == null) { return; } p.setData(list); CLPanelManager.showPanel(p); }
void destroySelf() { if (isActive) { return; } if (!CLPanelManager.panelRetainLayer.Contains(this)) { //虽然页面是关掉了,但是如果还是在panelRetainLayer里,则不能删除,因为当关掉顶层页面时,这个页面还是会被打开 CLPanelManager.destroyPanel(this, false); } }
public override void setLua() { //set lua if (lua == null || CLVerManager.self.haveUpgrade) { CLPanelManager.destoryAllPanel(); if (lua == null) { lua = mainLua; base.setLua(); } } }
// Use this for initialization public override void Start() { DateEx.init(); // 显示公司logo页面 CLPanelBase panel = CLPanelManager.getPanel(firstPanel); try { CLPanelManager.showPanel(panel); // SoundEx.playSound ("Coolape", 1); // 初始化 StartCoroutine(gameInit()); } catch (System.Exception e) { Debug.LogError(e); } }
/// <summary> /// Shows the calender.日期选择页面 /// </summary> /// <param name="paras">Paras.</param> public static void showCalender(params object[] paras) { if (paras != null && paras.Length >= 4) { ArrayList list = new ArrayList(); list.Add(paras [0]); //year); list.Add(paras [1]); //month); list.Add(paras [2]); //callback); list.Add(paras [3]); //isSetTime); CLPanelManager.getPanelAsy("PanelCalender", (Callback)onGetCalenderPanel, list); } else { showCalender(System.DateTime.Now.Year, System.DateTime.Now.Month, paras [0], paras [1]); } }
public static void showConfirm(string msg, bool isShowOneButton, string button1, object callback1, string button2, object callback2) { CLPanelBase p = CLPanelManager.getPanel("PanelConfirm"); if (p == null) { return; } ArrayList list = new ArrayList(); list.Add(msg); list.Add(isShowOneButton); list.Add(button1); list.Add(callback1); list.Add(button2); list.Add(callback2); p.setData(list); CLPanelManager.showPanel(p); }
public void showWithEffect(object finishShowingCallback = null) { this.finishShowingCallback = finishShowingCallback; isMoveOut = false; if (_mask4Hide != null) { NGUITools.SetActive(_mask4Hide, false); } if (!gameObject.activeInHierarchy || CLPanelManager.showingPanels [gameObject.name] == null) { NGUITools.SetActive(gameObject, true); // CLPanelManager.showingPanels [gameObject.name] = this; CLPanelManager.onShowPanel(this); } if (!isRefeshContentWhenEffectFinish) { callFinishShowingCallback(); } playEffect(true); }
public override bool hideSelfOnKeyBack() { try { bool isHide = false; object[] rets = null; if (lfhideSelfOnKeyBack != null) { rets = call(lfhideSelfOnKeyBack, ""); } if (rets != null && rets.Length > 0) { isHide = (bool)(rets [0]); } if (isHide) { CLPanelManager.hideTopPanel(); return(true); } } catch (System.Exception e) { Debug.LogError(e); } return(false); }
public virtual void doRestart() { CLPanelManager.destoryAllPanel(); FileEx.cleanCache(); CLUtlLua.cleanFileBytesCacheMap(); //CLUtlLua.isFinishAddLoader = false; CLUIInit.self.clean(); //重新把配置清空 CLMaterialPool.materialTexRefCfg = null; if (mainLua != null) { destoryLua(); // mainLua.Dispose (); // mainLua = null; resetMainLua(); } else { resetMainLua(); } luaTable = null; lua = null; Start(); }
void onFinishHideWithEffect(UITweener tweener = null) { isActive = false; CLPanelManager.onHidePanel(this); finishMoveOut(); }
public CLPanelManager() { self = this; }