public void SetBase()
    {
        List <EditorSelectionList.SelectionListEntry> baseMonster = new List <EditorSelectionList.SelectionListEntry>();

        Game game = Game.Get();

        baseMonster.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyItem(CommonStringKeys.NONE.Translate(), "{NONE}"));
        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            StringBuilder display          = new StringBuilder().Append(kv.Key);
            StringBuilder localizedDisplay = new StringBuilder().Append(kv.Value.name.Translate());
            List <string> sets             = new List <string>(kv.Value.traits);
            foreach (string s in kv.Value.sets)
            {
                if (s.Length == 0)
                {
                    sets.Add("base");
                }
                else
                {
                    display.Append(" ").Append(s);
                    localizedDisplay.Append(" ").Append(new StringKey("val", s).Translate());
                    sets.Add(s);
                }
            }
            baseMonster.Add(
                EditorSelectionList.SelectionListEntry.BuildNameKeyTraitsItem(
                    localizedDisplay.ToString(), display.ToString(), sets));
        }

        baseESL = new EditorSelectionList(
            new StringKey("val", "SELECT", CommonStringKeys.EVENT),
            baseMonster, delegate { SelectSetBase(); });
        baseESL.SelectItem();
    }
    public void AddTrait()
    {
        HashSet <string> traits = new HashSet <string>();

        Game game = Game.Get();

        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            foreach (string s in kv.Value.traits)
            {
                traits.Add(s);
            }
        }

        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        foreach (string s in traits)
        {
            list.Add(new EditorSelectionList.SelectionListEntry(s));
        }
        traitsESL = new EditorSelectionList(
            new StringKey("val", "SELECT", CommonStringKeys.ACTIVATION),
            list, delegate { SelectAddTraits(); });
        traitsESL.SelectItem();
    }
Esempio n. 3
0
    public void SetTrigger()
    {
        Game game = Game.Get();
        Dictionary <string, Color> triggers = new Dictionary <string, Color>();

        triggers.Add("", Color.white);

        bool startPresent = false;
        bool noMorale     = false;

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            QuestData.Event e = kv.Value as QuestData.Event;
            if (e != null)
            {
                if (e.trigger.Equals("EventStart"))
                {
                    startPresent = true;
                }
                if (e.trigger.Equals("NoMorale"))
                {
                    noMorale = true;
                }
            }
        }

        if (startPresent)
        {
            triggers.Add("EventStart", Color.grey);
        }
        else
        {
            triggers.Add("EventStart", Color.white);
        }

        if (noMorale)
        {
            triggers.Add("NoMorale", Color.grey);
        }
        else
        {
            triggers.Add("NoMorale", Color.white);
        }

        triggers.Add("EndRound", Color.white);

        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            triggers.Add("Defeated" + kv.Key, Color.white);
            triggers.Add("DefeatedUnique" + kv.Key, Color.white);
        }

        for (int i = 1; i <= 25; i++)
        {
            triggers.Add("EndRound" + i, Color.white);
        }

        triggerESL = new EditorSelectionList("Select Trigger", triggers, delegate { SelectEventTrigger(); });
        triggerESL.SelectItem();
    }
Esempio n. 4
0
    public void AddAssignOp()
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(new EditorSelectionList.SelectionListEntry("{NEW}", "Quest"));
        foreach (string s in GetQuestVars())
        {
            list.Add(new EditorSelectionList.SelectionListEntry(s, "Quest"));
        }

        list.Add(new EditorSelectionList.SelectionListEntry("#monsters", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#heroes", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#round", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#fire", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#eliminated", "Valkyrie"));
        foreach (ContentData.ContentPack pack in Game.Get().cd.allPacks)
        {
            if (pack.id.Length > 0)
            {
                list.Add(new EditorSelectionList.SelectionListEntry("#" + pack.id, "Valkyrie"));
            }
        }
        varESL = new EditorSelectionList("Select Var", list, delegate { SelectAddOp(false); });
        varESL.SelectItem();
    }
Esempio n. 5
0
    public void AddVisibility(bool add)
    {
        List <EditorSelectionList.SelectionListEntry> components = new List <EditorSelectionList.SelectionListEntry>();

        Game game = Game.Get();

        if (!add)
        {
            components.Add(new EditorSelectionList.SelectionListEntry("#boardcomponents", "Special"));
            components.Add(new EditorSelectionList.SelectionListEntry("#monsters", "Special"));
        }
        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            if (kv.Value is QuestData.Door || kv.Value is QuestData.Tile || kv.Value is QuestData.Token)
            {
                components.Add(new EditorSelectionList.SelectionListEntry(kv.Key, kv.Value.typeDynamic));
            }
            if (kv.Value is QuestData.Spawn && !add)
            {
                components.Add(new EditorSelectionList.SelectionListEntry(kv.Key, kv.Value.typeDynamic));
            }
        }

        visibilityESL = new EditorSelectionList(
            new StringKey("val", "SELECT", CommonStringKeys.TILE),
            components, delegate { SelectAddVisibility(add); });
        visibilityESL.SelectItem();
    }
Esempio n. 6
0
    public void MonsterTypeReplace(int pos)
    {
        Game game = Game.Get();
        List <EditorSelectionList.SelectionListEntry> monsters = new List <EditorSelectionList.SelectionListEntry>();

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            if (kv.Value is QuestData.UniqueMonster)
            {
                monsters.Add(new EditorSelectionList.SelectionListEntry(kv.Key, "Quest"));
            }
        }

        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            string        display = kv.Key;
            List <string> sets    = new List <string>(kv.Value.traits);
            foreach (string s in kv.Value.sets)
            {
                if (s.Length == 0)
                {
                    sets.Add("base");
                }
                else
                {
                    display += " " + s;
                    sets.Add(s);
                }
            }
            monsters.Add(new EditorSelectionList.SelectionListEntry(display, sets));
        }
        monsterTypeESL = new EditorSelectionList("Select Item", monsters, delegate { SelectMonsterType(pos, true); });
        monsterTypeESL.SelectItem();
    }
Esempio n. 7
0
    public void SetValue(QuestData.Event.VarOperation op)
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(new EditorSelectionList.SelectionListEntry("{NUMBER}", "Quest"));
        foreach (string s in GetQuestVars())
        {
            list.Add(new EditorSelectionList.SelectionListEntry(s, "Quest"));
        }

        list.Add(new EditorSelectionList.SelectionListEntry("#monsters", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#heroes", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#round", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#fire", "Valkyrie"));
        list.Add(new EditorSelectionList.SelectionListEntry("#eliminated", "Valkyrie"));
        foreach (ContentData.ContentPack pack in Game.Get().cd.allPacks)
        {
            if (pack.id.Length > 0)
            {
                list.Add(new EditorSelectionList.SelectionListEntry("#" + pack.id, "Valkyrie"));
            }
        }

        varESL = new EditorSelectionList("Select Value", list, delegate { SelectSetValue(op); });
        varESL.SelectItem();
    }
    public void SetBase()
    {
        List <EditorSelectionList.SelectionListEntry> baseMonster = new List <EditorSelectionList.SelectionListEntry>();

        Game game = Game.Get();

        baseMonster.Add(new EditorSelectionList.SelectionListEntry("{NONE}"));
        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            string        display = kv.Key;
            List <string> sets    = new List <string>(kv.Value.traits);
            foreach (string s in kv.Value.sets)
            {
                if (s.Length == 0)
                {
                    sets.Add("base");
                }
                else
                {
                    display += " " + s;
                    sets.Add(s);
                }
            }
            baseMonster.Add(new EditorSelectionList.SelectionListEntry(display, sets));
        }

        baseESL = new EditorSelectionList("Select Event", baseMonster, delegate { SelectSetBase(); });
        baseESL.SelectItem();
    }
Esempio n. 9
0
    public void SetTrigger()
    {
        List <string> triggers = new List <string>();

        triggers.Add("");
        triggers.Add("EventStart");
        triggers.Add("EndRound");
        triggers.Add("NoMorale");

        Game game = Game.Get();

        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            triggers.Add("Defeated" + kv.Key);
            triggers.Add("DefeatedUnique" + kv.Key);
        }

        for (int i = 1; i <= 25; i++)
        {
            triggers.Add("EndRound" + i);
        }

        triggerESL = new EditorSelectionList("Select Trigger", triggers, delegate { SelectEventTrigger(); });
        triggerESL.SelectItem();
    }
Esempio n. 10
0
 public void Class()
 {
     List<EditorSelectionList.SelectionListEntry> puzzleClass = new List<EditorSelectionList.SelectionListEntry>();
     puzzleClass.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyItem("slide"));
     puzzleClass.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyItem("code"));
     puzzleClass.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyItem("image"));
     classList = new EditorSelectionList(PUZZLE_CLASS_SELECT, puzzleClass, delegate { SelectClass(); });
     classList.SelectItem();
 }
Esempio n. 11
0
    public void AddAssignOp()
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyTraitItem("{" + CommonStringKeys.NEW.Translate() + "}", "{NEW}", "Quest"));
        list.AddRange(GetQuestVars());
        varESL = new EditorSelectionList(new StringKey("val", "SELECT", VAR), list, delegate { SelectAddOp(false); });
        varESL.SelectItem();
    }
Esempio n. 12
0
    public void Class()
    {
        List <EditorSelectionList.SelectionListEntry> puzzleClass = new List <EditorSelectionList.SelectionListEntry>();

        puzzleClass.Add(new EditorSelectionList.SelectionListEntry("slide"));
        puzzleClass.Add(new EditorSelectionList.SelectionListEntry("code"));
        puzzleClass.Add(new EditorSelectionList.SelectionListEntry("image"));
        classList = new EditorSelectionList("Select Class", puzzleClass, delegate { SelectClass(); });
        classList.SelectItem();
    }
    public void AddItem()
    {
        Game game = Game.Get();
        List <EditorSelectionList.SelectionListEntry> items = new List <EditorSelectionList.SelectionListEntry>();

        if (itemComponent.traits.Length > 0)
        {
            items.Add(new EditorSelectionList.SelectionListEntry("", Color.white));
        }

        HashSet <string> usedItems = new HashSet <string>();

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            QuestData.StartingItem i = kv.Value as QuestData.StartingItem;
            if (i != null)
            {
                if (i.traits.Length == 0)
                {
                    usedItems.Add(i.itemName[0]);
                }
            }
        }

        foreach (KeyValuePair <string, ItemData> kv in game.cd.items)
        {
            StringBuilder display          = new StringBuilder().Append(kv.Key);
            StringBuilder localizedDisplay = new StringBuilder().Append(kv.Value.name.Translate());
            List <string> sets             = new List <string>(kv.Value.traits);
            foreach (string s in kv.Value.sets)
            {
                if (s.Length == 0)
                {
                    sets.Add("base");
                }
                else
                {
                    display.Append(" ").Append(s);
                    localizedDisplay.Append(" ").Append(new StringKey("val", s).Translate());
                    sets.Add(s);
                }
            }

            Color buttonColor = Color.white;
            if (usedItems.Contains(kv.Key))
            {
                buttonColor = Color.grey;
            }

            items.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyTraitsColorItem(
                          localizedDisplay.ToString(), display.ToString(), sets, buttonColor));
        }
        itemESL = new EditorSelectionList(CommonStringKeys.SELECT_ITEM, items, delegate { SelectAddItem(); });
        itemESL.SelectItem();
    }
Esempio n. 14
0
    public void Colour()
    {
        List <EditorSelectionList.SelectionListEntry> colours = new List <EditorSelectionList.SelectionListEntry>();

        foreach (KeyValuePair <string, string> kv in ColorUtil.LookUp())
        {
            colours.Add(new EditorSelectionList.SelectionListEntry(kv.Key));
        }
        colorList = new EditorSelectionList(CommonStringKeys.SELECT_ITEM, colours, delegate { SelectColour(); });
        colorList.SelectItem();
    }
Esempio n. 15
0
    public void Image()
    {
        List <EditorSelectionList.SelectionListEntry> puzzleImage = new List <EditorSelectionList.SelectionListEntry>();

        foreach (KeyValuePair <string, PuzzleData> kv in Game.Get().cd.puzzles)
        {
            puzzleImage.Add(new EditorSelectionList.SelectionListEntry(kv.Key));
        }
        imageList = new EditorSelectionList("Select Image", puzzleImage, delegate { SelectImage(); });
        imageList.SelectItem();
    }
Esempio n. 16
0
    public void SetButtonColor(int number)
    {
        List <EditorSelectionList.SelectionListEntry> colours = new List <EditorSelectionList.SelectionListEntry>();

        foreach (KeyValuePair <string, string> kv in ColorUtil.LookUp())
        {
            colours.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyItem(kv.Key));
        }
        colorESL = new EditorSelectionList(CommonStringKeys.SELECT_ITEM, colours, delegate { SelectButtonColour(number); });
        colorESL.SelectItem();
    }
Esempio n. 17
0
    public void Colour()
    {
        List <string> colours = new List <string>();

        foreach (KeyValuePair <string, string> kv in ColorUtil.LookUp())
        {
            colours.Add(kv.Key);
        }
        colorList = new EditorSelectionList("Select Item", colours, delegate { SelectColour(); });
        colorList.SelectItem();
    }
Esempio n. 18
0
    public void SetAssignOpp(QuestData.Event.VarOperation op)
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(new EditorSelectionList.SelectionListEntry("="));
        list.Add(new EditorSelectionList.SelectionListEntry("+"));
        list.Add(new EditorSelectionList.SelectionListEntry("-"));
        list.Add(new EditorSelectionList.SelectionListEntry("*"));
        list.Add(new EditorSelectionList.SelectionListEntry("/"));
        varESL = new EditorSelectionList("Select Op", list, delegate { SelectSetOp(op); });
        varESL.SelectItem();
    }
    public void AddAssignOp()
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(new EditorSelectionList.SelectionListEntry("{NEW}"));
        foreach (string s in GetQuestVars())
        {
            list.Add(new EditorSelectionList.SelectionListEntry(s));
        }
        varESL = new EditorSelectionList(new StringKey("val", "SELECT", VAR), list, delegate { SelectAddOp(false); });
        varESL.SelectItem();
    }
Esempio n. 20
0
    public void AddItem()
    {
        Game game = Game.Get();
        List <EditorSelectionList.SelectionListEntry> items = new List <EditorSelectionList.SelectionListEntry>();

        if (itemComponent.traits.Length > 0)
        {
            items.Add(new EditorSelectionList.SelectionListEntry("", Color.white));
        }

        HashSet <string> usedItems = new HashSet <string>();

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            QuestData.Item i = kv.Value as QuestData.Item;
            if (i != null)
            {
                if (i.traits.Length == 0)
                {
                    usedItems.Add(i.itemName[0]);
                }
            }
        }

        foreach (KeyValuePair <string, ItemData> kv in game.cd.items)
        {
            string        display = kv.Key;
            List <string> sets    = new List <string>(kv.Value.traits);
            foreach (string s in kv.Value.sets)
            {
                if (s.Length == 0)
                {
                    sets.Add("base");
                }
                else
                {
                    display += " " + s;
                    sets.Add(s);
                }
            }

            if (usedItems.Contains(kv.Key))
            {
                items.Add(new EditorSelectionList.SelectionListEntry(display, sets, Color.grey));
            }
            else
            {
                items.Add(new EditorSelectionList.SelectionListEntry(display, sets, Color.white));
            }
        }
        itemESL = new EditorSelectionList("Select Item", items, delegate { SelectAddItem(); });
        itemESL.SelectItem();
    }
Esempio n. 21
0
    public void SetHeroCount(bool max)
    {
        List <EditorSelectionList.SelectionListEntry> num = new List <EditorSelectionList.SelectionListEntry>();

        for (int i = 0; i <= Game.Get().gameType.MaxHeroes(); i++)
        {
            num.Add(new EditorSelectionList.SelectionListEntry(i.ToString()));
        }

        heroCountESL = new EditorSelectionList("Select Number", num, delegate { SelectEventHeroCount(max); });
        heroCountESL.SelectItem();
    }
Esempio n. 22
0
    public void AddTestOp()
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(new EditorSelectionList.SelectionListEntry("{NEW}"));
        foreach (string s in GetQuestVars())
        {
            list.Add(new EditorSelectionList.SelectionListEntry(s));
        }
        varESL = new EditorSelectionList("Select Var", list, delegate { SelectAddOp(); });
        varESL.SelectItem();
    }
Esempio n. 23
0
 public void Skill()
 {
     List<EditorSelectionList.SelectionListEntry> skill = new List<EditorSelectionList.SelectionListEntry>();
     skill.Add(new EditorSelectionList.SelectionListEntry("{will} " + EventManager.OutputSymbolReplace("{will}")));
     skill.Add(new EditorSelectionList.SelectionListEntry("{strength} " + EventManager.OutputSymbolReplace("{strength}")));
     skill.Add(new EditorSelectionList.SelectionListEntry("{agility} " + EventManager.OutputSymbolReplace("{agility}")));
     skill.Add(new EditorSelectionList.SelectionListEntry("{lore} " + EventManager.OutputSymbolReplace("{lore}")));
     skill.Add(new EditorSelectionList.SelectionListEntry("{influence} " + EventManager.OutputSymbolReplace("{influence}")));
     skill.Add(new EditorSelectionList.SelectionListEntry("{observation} " + EventManager.OutputSymbolReplace("{observation}")));
     skillList = new EditorSelectionList(PUZZLE_SELECT_SKILL, skill, delegate { SelectSkill(); });
     skillList.SelectItem();
 }
Esempio n. 24
0
    public void MonsterTypeReplace(int pos)
    {
        Game          game     = Game.Get();
        List <string> monsters = new List <string>();

        foreach (KeyValuePair <string, MonsterData> kv in game.cd.monsters)
        {
            monsters.Add(kv.Key);
        }
        monsterTypeESL = new EditorSelectionList("Select Item", monsters, delegate { SelectMonsterType(pos, true); });
        monsterTypeESL.SelectItem();
    }
Esempio n. 25
0
    public void AddFlag(string type)
    {
        HashSet <string> flags = new HashSet <string>();

        flags.Add("{NEW}");

        Game game = Game.Get();

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            if (kv.Value is QuestData.Event)
            {
                QuestData.Event e = kv.Value as QuestData.Event;
                foreach (string s in e.flags)
                {
                    if (s.IndexOf("#") != 0)
                    {
                        flags.Add(s);
                    }
                }
                foreach (string s in e.setFlags)
                {
                    flags.Add(s);
                }
                foreach (string s in e.clearFlags)
                {
                    flags.Add(s);
                }
            }
        }

        if (type.Equals("flag"))
        {
            flags.Add("#monsters");
            flags.Add("#2hero");
            flags.Add("#3hero");
            flags.Add("#4hero");
            flags.Add("#5hero");
            foreach (ContentData.ContentPack pack in Game.Get().cd.allPacks)
            {
                if (pack.id.Length > 0)
                {
                    flags.Add("#" + pack.id);
                }
            }
        }

        List <string> list = new List <string>(flags);

        flagsESL = new EditorSelectionList("Select Flag", list, delegate { SelectAddFlag(type); });
        flagsESL.SelectItem();
    }
Esempio n. 26
0
    public void SetTestOpp(QuestData.Event.VarOperation op)
    {
        List <EditorSelectionList.SelectionListEntry> list = new List <EditorSelectionList.SelectionListEntry>();

        list.Add(new EditorSelectionList.SelectionListEntry("=="));
        list.Add(new EditorSelectionList.SelectionListEntry("!="));
        list.Add(new EditorSelectionList.SelectionListEntry(">="));
        list.Add(new EditorSelectionList.SelectionListEntry("<="));
        list.Add(new EditorSelectionList.SelectionListEntry(">"));
        list.Add(new EditorSelectionList.SelectionListEntry("<"));
        varESL = new EditorSelectionList("Select Op", list, delegate { SelectSetOp(op); });
        varESL.SelectItem();
    }
    public void Skill()
    {
        List <string> skill = new List <string>();

        skill.Add("{will} " + EventManager.SymbolReplace("{will}"));
        skill.Add("{strength} " + EventManager.SymbolReplace("{strength}"));
        skill.Add("{agility} " + EventManager.SymbolReplace("{agility}"));
        skill.Add("{lore} " + EventManager.SymbolReplace("{lore}"));
        skill.Add("{influence} " + EventManager.SymbolReplace("{influence}"));
        skill.Add("{observation} " + EventManager.SymbolReplace("{observation}"));
        skillList = new EditorSelectionList("Select Skill", skill, delegate { SelectSkill(); });
        skillList.SelectItem();
    }
Esempio n. 28
0
    public void ChangeTileSide()
    {
        Game game = Game.Get();

        // Work out what sides are used
        HashSet <string> usedSides = new HashSet <string>();

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            QuestData.Tile t = kv.Value as QuestData.Tile;
            if (t != null)
            {
                usedSides.Add(t.tileSideName);
                usedSides.Add(game.cd.tileSides[t.tileSideName].reverse);
            }
        }

        List <EditorSelectionList.SelectionListEntry> sides = new List <EditorSelectionList.SelectionListEntry>();

        foreach (KeyValuePair <string, TileSideData> kv in game.cd.tileSides)
        {
            StringBuilder display          = new StringBuilder().Append(kv.Key);
            StringBuilder localizedDisplay = new StringBuilder().Append(kv.Value.name.Translate());
            List <string> traits           = new List <string>(kv.Value.traits);
            foreach (string s in kv.Value.sets)
            {
                if (s.Length == 0)
                {
                    traits.Add("base");
                }
                else
                {
                    display.Append(" ").Append(s);
                    traits.Add(s);
                }
            }

            Color buttonColor = Color.white;

            if (usedSides.Contains(kv.Key))
            {
                buttonColor = Color.grey;
            }

            sides.Add(EditorSelectionList.SelectionListEntry.BuildNameKeyTraitsColorItem(
                          localizedDisplay.ToString(), display.ToString(), traits, buttonColor));
        }
        tileESL = new EditorSelectionList(
            new StringKey("val", "SELECT", CommonStringKeys.TILE), sides, delegate { SelectTileSide(); });
        tileESL.SelectItem();
    }
Esempio n. 29
0
    public void SetHeroCount(bool max)
    {
        List <EditorSelectionList.SelectionListEntry> num = new List <EditorSelectionList.SelectionListEntry>();

        for (int i = 0; i <= Game.Get().gameType.MaxHeroes(); i++)
        {
            num.Add(new EditorSelectionList.SelectionListEntry(i.ToString()));
        }

        heroCountESL = new EditorSelectionList(
            new StringKey("val", "SELECT", CommonStringKeys.NUMBER),
            num, delegate { SelectEventHeroCount(max); });
        heroCountESL.SelectItem();
    }
Esempio n. 30
0
    public void AddVisibility(bool add)
    {
        List <string> components = new List <string>();

        Game game = Game.Get();

        foreach (KeyValuePair <string, QuestData.QuestComponent> kv in game.quest.qd.components)
        {
            components.Add(kv.Key);
        }

        visibilityESL = new EditorSelectionList("Select Event", components, delegate { SelectAddVisibility(add); });
        visibilityESL.SelectItem();
    }