public void ShowWindow(string windowName, EventParam param, Action OnComplete) { UIBaseWindow window = LoadWindow(windowName); if (null != window) { window.ShowWindow(param, OnComplete); } }
/// <summary> /// 显示界面,方面在现实之前做其他操作 /// </summary> protected virtual void RealShowWindow(UIBaseWindow baseWindow, WindowID id) { baseWindow.ShowWindow(); shownWindows[id] = baseWindow; if (baseWindow.windowData.windowType == UIWindowType.Normal) { // 改变当前显示Normal窗口 lastShownNormalWindow = curShownNormalWindow; curShownNormalWindow = baseWindow; } }
// 直接打开窗口 protected void ShowWindowForBack(WindowID id) { // 检测控制权限 if (!this.IsWindowInControl(id)) { Debug.Log("UIManager has no control power of " + id.ToString()); return; } if (shownWindows.ContainsKey(id)) { return; } UIBaseWindow baseWindow = GetGameWindow(id); baseWindow.ShowWindow(); shownWindows[baseWindow.GetID] = baseWindow; }
private void InitRootWindowConfig() { windowsParent = Utils.FindChild(uiRoot, "Canvas/windows_parent"); if (null == windowsParent) { Logger.LogError("find windows parent node failed!!! uiroot name = " + uiRoot.name); } UIBaseWindow[] windows = windowsParent.GetComponentsInChildren <UIBaseWindow>(true); for (int index = 0; index < windows.Length; ++index) { UIBaseWindow window = windows[index]; windowDic[window.name] = window; windowLst.Add(window); if (window.IsDefaultOpen) { window.ShowWindow(); } } }