private void setViewOpen(IBaseView view, params object[] param) { if (!view.isInit()) { view.initUI(); } view.initData(); view.addToParent(); view.setVisible(true); view.open(param); }
/** * 开启面板 * @param key 面板唯一标识 * @param param 参数 * */ public IBaseView open(int key, params object[] param) { IBaseView view = this.getView(key); if (view == null) { return(null); } if (view.isShow()) { view.open(view, param); view.setViewTop(); return(view); } if (view.isInit()) { view.addToParent(); view.open(view, param); } else { GuiConfig config = GuiConfig.GetConfig(key); if (config == null) { return(null); } else { this.setViewOpen(view, param, key); } } this.openUIPlaySound(key); this._opens.Add(key); this.setOpenDepth(); view.setViewTop(); return(view); }