Пример #1
0
        /// <summary>
        /// Removes a control from the GUI
        /// </summary>
        /// <param name="ui">The CustomUI to remove</param>
        public static void RemoveUI(CustomUI ui)
        {
            CustomUIs.Remove(ui);

            if (OnUIRemoved != null)
            {
                OnUIRemoved(ui);
            }

            ui.Dispose();
        }
Пример #2
0
        /// <summary>
        /// Adds a control to the GUI
        /// </summary>
        /// <param name="ui">The control to add</param>
        public static void AddUI(CustomUI ui)
        {
            CustomUIs.Add(ui);

            ui.Init();

            if (OnUIAdded != null)
            {
                OnUIAdded(ui);
            }
        }