// Open component selection top level // Menu for selection of all component types, includes delete options public static void TypeSelect(string type = "") { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } Game game = Game.Get(); UIWindowSelectionListTraits select = new UIWindowSelectionListTraits(SelectComponent, CommonStringKeys.SELECT_ITEM); select.AddNewComponentItem("Tile"); select.AddNewComponentItem("Token"); select.AddNewComponentItem("Spawn"); select.AddNewComponentItem("Event"); select.AddNewComponentItem("CustomMonster"); select.AddNewComponentItem("UI"); select.AddNewComponentItem("QItem"); if (game.gameType is D2EGameType || game.gameType is IAGameType) { select.AddNewComponentItem("Activation"); select.AddNewComponentItem("Door"); select.AddNewComponentItem("MPlace"); } else { select.AddNewComponentItem("Puzzle"); } Dictionary <string, IEnumerable <string> > traits = new Dictionary <string, IEnumerable <string> >(); traits.Add(new StringKey("val", "TYPE").Translate(), new string[] { "Quest" }); select.AddItem(CommonStringKeys.QUEST.Translate(), "Quest", traits); foreach (QuestData.QuestComponent c in game.quest.qd.components.Values) { if (!(c is PerilData)) { select.AddItem(c); } } select.Draw(); if (type.Length > 0) { select.SelectTrait(new StringKey("val", "TYPE").Translate(), new StringKey("val", type.ToUpper()).Translate()); } }