| | |
| | | };
|
| | |
|
| | | UIRoot m_UIRoot;
|
| | | public UIRoot uiRoot
|
| | | {
|
| | | get
|
| | | {
|
| | | public UIRoot uiRoot {
|
| | | get {
|
| | | if (m_UIRoot == null)
|
| | | {
|
| | | var prefab = BuiltInLoader.LoadPrefab("UIRoot");
|
| | |
| | | }
|
| | |
|
| | | WindowAsyncLoad m_AnyncLoad;
|
| | | public WindowAsyncLoad asyncLoad
|
| | | {
|
| | | get
|
| | | {
|
| | | public WindowAsyncLoad asyncLoad {
|
| | | get {
|
| | | if (m_AnyncLoad == null)
|
| | | {
|
| | | var gameObject = new GameObject("WindowAnyncLoad");
|
| | |
| | |
|
| | | public void Close(string name)
|
| | | {
|
| | | PushCloseCommand(new CloseCommand()
|
| | | if (WindowConfig.Get().IsChildWindow(name))
|
| | | {
|
| | | name = name,
|
| | | });
|
| | | CloseImmediately(name);
|
| | | }
|
| | | else
|
| | | {
|
| | | PushCloseCommand(new CloseCommand()
|
| | | {
|
| | | name = name,
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | public void CloseImmediately(string name)
|
| | | {
|
| | | Window window;
|
| | | if (windows.TryGetValue(name, out window))
|
| | | {
|
| | | if (window.windowState != Window.WindowState.Closed)
|
| | | {
|
| | | window.CloseImmediately();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void PushCloseCommand(CloseCommand command)
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | isIgnore = isIgnore || WindowConfig.Get().IsChildWindow(name);
|
| | | if (!isIgnore)
|
| | | {
|
| | | if (window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening)
|
| | |
| | | var name = windows.Keys[i];
|
| | | var window = windows[name];
|
| | | if (window == null || window is T)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var isIgnore = WindowConfig.Get().IsChildWindow(name);
|
| | | if (isIgnore)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
| | | isIgnore = windowNames.Contains(name) || window.windowInfo.windowType >= WindowType.System || closeAllIgnoreWindows.Contains(name);
|
| | | break;
|
| | | }
|
| | |
|
| | | isIgnore = isIgnore || WindowConfig.Get().IsChildWindow(name);
|
| | |
|
| | | if (!isIgnore)
|
| | | {
|
| | |
| | | Dictionary<string, Window> windows = new Dictionary<string, Window>();
|
| | | List<string> windowKeys = new List<string>();
|
| | |
|
| | | public Window this[string key]
|
| | | {
|
| | | public Window this[string key] {
|
| | | get { return windows[key]; }
|
| | | set
|
| | | {
|
| | | set {
|
| | | windows[key] = value;
|
| | | if (!windowKeys.Contains(key))
|
| | | {
|