Пример #1
0
        public void RemoveTileset(Tileset t)
        {
            if (tilesetList.Contains(t))
            {
                tilesetList.Remove(t);
                t.Dispose();

                foreach (Template temp in t.references)
                {
                    editor.templateMenu.RemoveTemplate(temp);
                    editor.DeleteTemplate(temp);
                }
            }
        }
Пример #2
0
        void RemoveTemplate(TemplateButton tb)
        {
            foreach (List <TemplateButton> t in tabList)
            {
                if (t.Contains(tb))
                {
                    int index = t.IndexOf(tb);

                    for (int i = index + 1; i < t.Count; i++)
                    {
                        t[i].Index -= 1;
                        tb.Dispose();
                        editor.DeleteTemplate(tb.template);
                    }

                    t.Remove(tb);
                }
            }
        }