Exemple #1
0
        /// <summary>
        /// Removes a container.
        /// </summary>
        /// <param name="container"></param>
        public static void RemoveContainer(GuiContainer container)
        {
            GUIWindows.Remove(container);

            if (container.Visible)
            {
                ShowLast();
            }
        }
Exemple #2
0
        /// <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);
            }
        }