Beispiel #1
0
        public ModUICustom AddCustom(Action onGUI, Func <bool> isEnabled, int priority = 0)
        {
            ModUICustom uiCustom = new ModUICustom(onGUI, isEnabled, priority);

            AddCustom(uiCustom);
            return(uiCustom);
        }
Beispiel #2
0
        public void RemoveCustom(string id)
        {
            ModUICustom custom = customsById[id];

            customsById.Remove(id);
            customs.Remove(custom);
        }
Beispiel #3
0
        public void AddCustom(ModUICustom uiCustom)
        {
            if (customsById.ContainsKey(uiCustom.id))
            {
                ModUICustom oldCustom = customsById[uiCustom.id];
                customs[customs.FindIndex(c => c.id == uiCustom.id)] = uiCustom;
            }
            else
            {
                if (uiCustom.id != "")
                {
                    customsById[uiCustom.id] = uiCustom;
                }

                customs.Add(uiCustom);
            }

            UpdateSort();
        }
Beispiel #4
0
 public void AddCustom(ModUICustom uiCustom)
 {
     customs.Add(uiCustom);
     UpdateSort();
 }