public void Image() { if (puzzleComponent.puzzleClass.Equals("code")) { UIWindowSelectionList selectType = new UIWindowSelectionList(SelectImage, SELECT_IMAGE.Translate()); selectType.AddItem("{NUMBERS}", ""); selectType.AddItem(new StringKey("val", "SYMBOL").Translate(), "symbol"); selectType.AddItem(new StringKey("val", "ELEMENT").Translate(), "element"); selectType.Draw(); return; } UIWindowSelectionListImage select = new UIWindowSelectionListImage(SelectImage, SELECT_IMAGE.Translate()); Dictionary <string, IEnumerable <string> > traits = new Dictionary <string, IEnumerable <string> >(); traits.Add(new StringKey("val", "SOURCE").Translate(), new string[] { new StringKey("val", "FILE").Translate() }); string relativePath = new FileInfo(Path.GetDirectoryName(Game.Get().quest.qd.questPath)).FullName; foreach (string s in Directory.GetFiles(relativePath, "*.png", SearchOption.AllDirectories)) { select.AddItem(s.Substring(relativePath.Length + 1), traits); } foreach (string s in Directory.GetFiles(relativePath, "*.jpg", SearchOption.AllDirectories)) { select.AddItem(s.Substring(relativePath.Length + 1), traits); } foreach (KeyValuePair <string, PuzzleData> kv in Game.Get().cd.puzzles) { select.AddItem(kv.Value); } select.ExcludeExpansions(); select.Draw(); }
public void ChangeSource() { UIWindowSelectionList select = new UIWindowSelectionList(SelectSource, CommonStringKeys.SELECT_FILE); select.AddItem("{NEW:File}", true); string relativePath = new FileInfo(Path.GetDirectoryName(Game.Get().quest.qd.questPath)).FullName; foreach (string s in Directory.GetFiles(relativePath, "*.ini", SearchOption.AllDirectories)) { select.AddItem(s.Substring(relativePath.Length + 1)); } select.Draw(); }
private void SelectLanguage(string id, string type) { UIWindowSelectionList select = new UIWindowSelectionList( delegate(string val) { UpdateLanguage(id, val, type); }, CommonStringKeys.CHOOSE_LANGUAGE, true); select.AddItem(DEFAULT_LANGUAGE_KEY); foreach (var s in OptionsScreen.ENABLED_LANGS) { select.AddItem(s); } select.Draw(); }
public void Class() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectClass, PUZZLE_CLASS_SELECT); select.AddItem(new StringKey("val", "slide")); select.AddItem(new StringKey("val", "code")); select.AddItem(new StringKey("val", "image")); select.Draw(); }
public void AddTrait(bool pool = false) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } Game game = Game.Get(); HashSet <string> traits = new HashSet <string>(); foreach (ItemData id in game.cd.Values <ItemData>()) { foreach (string s in id.traits) { traits.Add(s); } } UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { SelectAddTrait(pool, s); }, new StringKey("val", "SELECT", CommonStringKeys.TRAITS)); foreach (string s in traits) { select.AddItem(new StringKey("val", s)); } select.Draw(); }
public void MonsterTraitsAdd(bool pool = false) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } Game game = Game.Get(); HashSet <string> traits = new HashSet <string>(); foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters) { foreach (string s in kv.Value.traits) { traits.Add(s); } } UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { SelectMonsterTrait(pool, s); }, new StringKey("val", "SELECT", CommonStringKeys.TRAITS)); foreach (string s in traits) { select.AddItem(new StringKey("val", s)); } select.Draw(); }
public void AddTrait() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } Game game = Game.Get(); HashSet <string> traits = new HashSet <string>(); foreach (MonsterData monster in game.cd.Values <MonsterData>()) { foreach (string s in monster.traits) { traits.Add(s); } } UIWindowSelectionList select = new UIWindowSelectionList(SelectAddTraits, new StringKey("val", "SELECT", CommonStringKeys.TRAITS)); foreach (string s in traits) { select.AddItem(s); } select.Draw(); }
public void SetImagePlace() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectImagePlace, SELECT_IMAGE); string relativePath = new FileInfo(Path.GetDirectoryName(Game.Get().quest.qd.questPath)).FullName; foreach (string s in Directory.GetFiles(relativePath, "*.png", SearchOption.AllDirectories)) { select.AddItem(s.Substring(relativePath.Length + 1)); } foreach (string s in Directory.GetFiles(relativePath, "*.jpg", SearchOption.AllDirectories)) { select.AddItem(s.Substring(relativePath.Length + 1)); } select.Draw(); }
public void NewAttackType() { UIWindowSelectionList select = new UIWindowSelectionList(NewInvestigatorAttack, new StringKey("val", "SELECT", CommonStringKeys.TYPE)); HashSet <string> attackTypes = Game.Get().cd.Values <AttackData>() .Select(a => a.attackType) .ToSet(); foreach (string s in attackTypes) { select.AddItem(new StringKey("val", s)); } select.Draw(); }
public void SetBackgroundColour() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectBackgroundColour, CommonStringKeys.SELECT_ITEM); foreach (KeyValuePair <string, string> kv in ColorUtil.LookUp()) { select.AddItem(new StringKey("val", kv.Key)); } select.Draw(); }
private void SetTextAlignment() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectTextAlignment, CommonStringKeys.SELECT_ITEM); foreach (TextAlignment alignment in Enum.GetValues(typeof(TextAlignment))) { select.AddItem(new StringKey("val", alignment.ToString())); } select.Draw(); }
public void SetHeroCount(bool max) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } Game game = Game.Get(); UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { SelectEventHeroCount(max, s); }, new StringKey("val", "SELECT", CommonStringKeys.NUMBER)); for (int i = 0; i <= game.gameType.MaxHeroes(); i++) { select.AddItem(i.ToString()); } select.Draw(); }
public void SetButtonColor(int number) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { SelectButtonColour(number, s); }, CommonStringKeys.SELECT_ITEM); foreach (string s in ColorUtil.LookUp().Keys) { select.AddItem(s); } select.Draw(); }
public void Colour() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectColour, CommonStringKeys.SELECT_ITEM); foreach (string s in ColorUtil.LookUp().Keys) { select.AddItem(s); } select.Draw(); }
public void NewAttackType() { UIWindowSelectionList select = new UIWindowSelectionList(NewInvestigatorAttack, new StringKey("val", "SELECT", new StringKey("val", "TYPE"))); HashSet <string> attackTypes = new HashSet <string>(); foreach (AttackData a in Game.Get().cd.investigatorAttacks.Values) { attackTypes.Add(a.attackType); } foreach (string s in attackTypes) { select.AddItem(new StringKey("val", s)); } select.Draw(); }
public void QuestAddPack() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectQuestAddPack, SELECT_PACK); foreach (ContentData.ContentPack pack in Game.Get().cd.allPacks) { if (pack.id.Length > 0) { select.AddItem(new StringKey("val", pack.id)); } } select.Draw(); }
public void MonsterTraitsAdd(bool pool = false) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } Game game = Game.Get(); HashSet <string> traits = game.cd.Values <MonsterData>() .SelectMany(m => m.traits) .ToSet(); UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { SelectMonsterTrait(pool, s); }, new StringKey("val", "SELECT", CommonStringKeys.TRAITS)); foreach (string s in traits) { select.AddItem(new StringKey("val", s)); } select.Draw(); }
public ReorderComponents() { Game game = Game.Get(); HashSet <string> sources = new HashSet <string>(); foreach (QuestData.QuestComponent c in game.quest.qd.components.Values) { if (!(c is PerilData)) { sources.Add(c.source); } } UIWindowSelectionList select = new UIWindowSelectionList(ReorderSource, new StringKey("val", "SELECT", CommonStringKeys.FILE)); foreach (string s in sources) { select.AddItem(s); } select.Draw(); }
public void Skill() { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(SelectSkill, PUZZLE_SELECT_SKILL); select.AddItem("{will} " + EventManager.OutputSymbolReplace("{will}")); select.AddItem("{strength} " + EventManager.OutputSymbolReplace("{strength}")); select.AddItem("{agility} " + EventManager.OutputSymbolReplace("{agility}")); select.AddItem("{lore} " + EventManager.OutputSymbolReplace("{lore}")); select.AddItem("{influence} " + EventManager.OutputSymbolReplace("{influence}")); select.AddItem("{observation} " + EventManager.OutputSymbolReplace("{observation}")); select.Draw(); }
public void SetAssignOpp(VarOperation op) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { EditorComponentVarTestsUtil.SelectSetOp(op, s, Update); }, new StringKey("val", "SELECT", CommonStringKeys.OP)); select.AddItem("="); select.AddItem("+"); select.AddItem("-"); select.AddItem("*"); select.AddItem("/"); select.AddItem("%"); select.Draw(); }
public void SetAssignOpp(VarOperation op) { if (GameObject.FindGameObjectWithTag(Game.DIALOG) != null) { return; } UIWindowSelectionList select = new UIWindowSelectionList(delegate(string s) { SelectSetOp(op, s); }, new StringKey("val", "SELECT", OP)); select.AddItem("="); select.AddItem("+"); select.AddItem("-"); select.AddItem("*"); select.AddItem("/"); select.AddItem("%"); select.Draw(); }