public void RegisterWindow(UI_WindowBase window) { if (IsWindowRunning(window) == true) { return; } var blockUIDic = ClassManager.GetTypesDefinedWith <GM_AttributeBlockController>(); var windowName = window.GetType().Name; if (blockUIDic.ContainsKey(windowName) == true) { IsUIBlockingController = true; } runningWindow.Add(window.GetType().Name, window); }
public void UnregisterWindow(UI_WindowBase window) { if (IsWindowRunning(window) == false) { return; } runningWindow.Remove(window.GetType().Name); var blockUIDic = ClassManager.GetTypesDefinedWith <GM_AttributeBlockController>(); var turnOffUIBlocker = true; foreach (var w in runningWindow) { if (blockUIDic.ContainsKey(w.Key) == true) { turnOffUIBlocker = false; break; } } IsUIBlockingController = !turnOffUIBlocker; }
public bool IsWindowRunning(UI_WindowBase windowBase) { return(runningWindow.ContainsKey(windowBase.GetType().Name)); }