/// <summary> /// Removes a container. /// </summary> /// <param name="container"></param> public static void RemoveContainer(GuiContainer container) { GUIWindows.Remove(container); if (container.Visible) { ShowLast(); } }
/// <summary> /// Sets that container as the visible container, and gives it priority. /// <paramref name="ignore"/>A container to not clear when popping up a new one, such as the in game escape menu.<paramref name="ignore"/> /// </summary> /// <param name="container"></param> public static void Popup(GuiContainer container) { if (GUIWindows.Contains(container)) { MenuHandler.Clear(); container.Visible = true; container.Priority = RenderingData.GetGUIContainerPriority(); GUIWindows.Remove(container); GUIWindows.Add(container); } else { MenuHandler.Clear(); container.Visible = true; container.Priority = RenderingData.GetGUIContainerPriority(); GUIWindows.Add(container); } }