コード例 #1
0
    public float DrawInvestigatorAttacks(float offset)
    {
        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0.5f, offset, 18, 1);
        ui.SetText(new StringKey("val", "INVESTIGATOR_ATTACKS"));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(18.5f, offset, 1, 1);
        ui.SetText(CommonStringKeys.PLUS, Color.green);
        ui.SetButton(NewAttackType);
        new UIElementBorder(ui, Color.green);
        offset += 1;

        attacksUIE = new Dictionary <string, List <UIElementEditablePaneled> >();
        foreach (string attackType in monsterComponent.investigatorAttacks.Keys)
        {
            string aType = attackType;
            attacksUIE.Add(attackType, new List <UIElementEditablePaneled>());
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0.5f, offset, 18, 1);
            ui.SetText(new StringKey("val", attackType));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(17.5f, offset, 1, 1);
            ui.SetText(CommonStringKeys.PLUS, Color.green);
            ui.SetButton(delegate { NewInvestigatorAttack(aType); });
            new UIElementBorder(ui, Color.green);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(18.5f, offset, 1, 1);
            ui.SetText(CommonStringKeys.MINUS, Color.red);
            ui.SetButton(delegate { RemoveInvestigatorAttackType(aType); });
            new UIElementBorder(ui, Color.red);
            offset += 1;

            foreach (StringKey attack in monsterComponent.investigatorAttacks[attackType])
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(18.5f, offset, 1, 1);
                ui.SetText(CommonStringKeys.MINUS, Color.red);
                ui.SetButton(delegate { RemoveInvestigatorAttack(attackType, attack); });
                new UIElementBorder(ui, Color.red);
                offset += 1;

                UIElementEditablePaneled uie = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
                uie.SetLocation(0.5f, offset, 19, 18);
                uie.SetText(attack.Translate());
                offset += uie.HeightToTextPadding(1);
                uie.SetButton(UpdateAttacks);
                new UIElementBorder(uie);
                attacksUIE[attackType].Add(uie);
            }
        }
        return(offset + 1);
    }
コード例 #2
0
    public float MoMActivation(float offset)
    {
        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0.5f, offset++, 19, 1);
        ui.SetText(new StringKey("val", "X_COLON", INITIAL_MESSAGE));

        abilityUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        abilityUIE.SetLocation(0.5f, offset, 19, 18);
        abilityUIE.SetText(activationComponent.ability.Translate(true));
        offset += abilityUIE.HeightToTextPadding(1);
        abilityUIE.SetButton(delegate { UpdateAbility(); });
        new UIElementBorder(abilityUIE);
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 9.5f, 1);
        ui.SetText(UNABLE_BUTTON);

        moveButtonUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        moveButtonUIE.SetLocation(9.5f, offset, 10, 1);
        moveButtonUIE.SetText(activationComponent.moveButton.Translate(true));
        moveButtonUIE.SetSingleLine();
        moveButtonUIE.SetButton(delegate { UpdateMoveButton(); });
        new UIElementBorder(moveButtonUIE);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset++, 19, 1);
        ui.SetText(new StringKey("val", "X_COLON", ATTACK_MESSAGE));

        masterActionsUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        masterActionsUIE.SetLocation(0.5f, offset, 19, 18);
        masterActionsUIE.SetText(activationComponent.masterActions.Translate(true));
        offset += masterActionsUIE.HeightToTextPadding(1);
        masterActionsUIE.SetButton(delegate { UpdateMasterActions(); });
        new UIElementBorder(masterActionsUIE);
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset++, 19, 1);
        ui.SetText(new StringKey("val", "X_COLON", NO_ATTACK_MESSAGE));

        moveUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        moveUIE.SetLocation(0.5f, offset, 19, 8);
        moveUIE.SetText(activationComponent.move.Translate(true));
        offset += moveUIE.HeightToTextPadding(1);
        moveUIE.SetButton(delegate { UpdateMove(); });
        new UIElementBorder(moveUIE);
        offset += 1;

        return(offset);
    }
コード例 #3
0
    virtual public float AddEventDialog(float offset)
    {
        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0, offset++, 20, 1);
        ui.SetText(new StringKey("val", "X_COLON", DIALOG));

        eventTextUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        eventTextUIE.SetLocation(0.5f, offset, 19, 18);
        eventTextUIE.SetText(eventComponent.text.Translate(true));
        offset += eventTextUIE.HeightToTextPadding(1);
        eventTextUIE.SetButton(delegate { UpdateText(); });
        new UIElementBorder(eventTextUIE);
        return(offset + 1);
    }
コード例 #4
0
    override public float AddSubComponents(float offset)
    {
        Game game = Game.Get();

        nameUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        nameUIE.SetLocation(0.5f, offset, 19, 1);
        nameUIE.SetText(game.quest.qd.quest.name.Translate());
        nameUIE.SetButton(delegate { UpdateQuestName(); });
        nameUIE.SetSingleLine();
        new UIElementBorder(nameUIE);
        offset += 2;

        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0, offset, 5, 1);
        ui.SetText(new StringKey("val", "X_COLON", HIDDEN));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(5, offset, 3, 1);
        ui.SetButton(delegate { ToggleHidden(); });
        new UIElementBorder(ui);
        if (game.quest.qd.quest.hidden)
        {
            ui.SetText(CommonStringKeys.TRUE);
        }
        else
        {
            ui.SetText(CommonStringKeys.FALSE);
        }
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 5, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "IMAGE")));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(5, offset, 12, 1);
        ui.SetButton(delegate { Image(); });
        ui.SetText(game.quest.qd.quest.image);
        new UIElementBorder(ui);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset++, 8, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "DESCRIPTION")));
        ui.SetTextAlignment(TextAnchor.MiddleLeft);

        descriptionUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        descriptionUIE.SetLocation(0.5f, offset, 19, 30);
        descriptionUIE.SetText(game.quest.qd.quest.description.Translate(true));
        offset += descriptionUIE.HeightToTextPadding(1);
        descriptionUIE.SetButton(delegate { UpdateQuestDesc(); });
        new UIElementBorder(descriptionUIE);
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset++, 30, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "SYNOPSYS")));
        ui.SetTextAlignment(TextAnchor.MiddleLeft);

        synopsysUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        synopsysUIE.SetLocation(0.5f, offset, 19, 4);
        synopsysUIE.SetText(game.quest.qd.quest.synopsys.Translate(true));
        offset += synopsysUIE.HeightToTextPadding(1);
        synopsysUIE.SetButton(delegate { UpdateQuestSynopsys(); });
        synopsysUIE.SetSingleLine();
        new UIElementBorder(synopsysUIE);
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset++, 8, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "AUTHORS")));
        ui.SetTextAlignment(TextAnchor.MiddleLeft);

        authorsUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        authorsUIE.SetLocation(0.5f, offset, 19, 16);
        authorsUIE.SetText(game.quest.qd.quest.authors.Translate(true));
        offset += authorsUIE.HeightToTextPadding(1);
        authorsUIE.SetButton(delegate { UpdateQuestAuth(); });
        new UIElementBorder(authorsUIE);
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset++, 35, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "AUTHORS_SHORT")));
        ui.SetTextAlignment(TextAnchor.MiddleLeft);

        authors_shortUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        authors_shortUIE.SetLocation(0.5f, offset, 19, 1f);
        authors_shortUIE.SetText(game.quest.qd.quest.authors_short.Translate(true));
        offset += authors_shortUIE.HeightToTextPadding(0);
        authors_shortUIE.SetButton(delegate { UpdateQuestShortAuth(); });
        authors_shortUIE.SetSingleLine();
        new UIElementBorder(authors_shortUIE);
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset, 10, 1);
        ui.SetText(REQUIRED_EXPANSIONS);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(10.5f, offset, 1, 1);
        ui.SetButton(delegate { QuestAddPack(); });
        ui.SetText(CommonStringKeys.PLUS, Color.green);
        new UIElementBorder(ui, Color.green);

        offset += 1;
        int index;

        for (index = 0; index < game.quest.qd.quest.packs.Length; index++)
        {
            int i = index;
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0.5f, offset, 10, 1);
            ui.SetText(new StringKey("val", game.quest.qd.quest.packs[index]));
            new UIElementBorder(ui);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(10.5f, offset, 1, 1);
            ui.SetButton(delegate { QuestRemovePack(i); });
            ui.SetText(CommonStringKeys.MINUS, Color.red);
            new UIElementBorder(ui, Color.red);
            offset += 1;
        }
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 7.5f, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "MIN_X", game.gameType.HeroesName())));

        minHeroUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        minHeroUIE.SetLocation(7.5f, offset, 2, 1);
        minHeroUIE.SetText(game.quest.qd.quest.minHero.ToString());
        minHeroUIE.SetSingleLine();
        minHeroUIE.SetButton(delegate { UpdateMinHero(); });
        new UIElementBorder(minHeroUIE);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(9.5f, offset, 7.5f, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "MAX_X", game.gameType.HeroesName())));

        maxHeroUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        maxHeroUIE.SetLocation(17, offset, 2, 1);
        maxHeroUIE.SetText(game.quest.qd.quest.maxHero.ToString());
        maxHeroUIE.SetSingleLine();
        maxHeroUIE.SetButton(delegate { UpdateMaxHero(); });
        new UIElementBorder(maxHeroUIE);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 7.5f, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "MIN_X", new StringKey("val", "DURATION"))));

        minLengthUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        minLengthUIE.SetLocation(7.5f, offset, 2, 1);
        minLengthUIE.SetText(game.quest.qd.quest.lengthMin.ToString());
        minLengthUIE.SetSingleLine();
        minLengthUIE.SetButton(delegate { UpdateMinLength(); });
        new UIElementBorder(minLengthUIE);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(9.5f, offset, 7.5f, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "MAX_X", new StringKey("val", "DURATION"))));

        maxLengthUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        maxLengthUIE.SetLocation(17, offset, 2, 1);
        maxLengthUIE.SetText(game.quest.qd.quest.lengthMax.ToString());
        maxLengthUIE.SetSingleLine();
        maxLengthUIE.SetButton(delegate { UpdateMaxLength(); });
        new UIElementBorder(maxLengthUIE);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 7.5f, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "DIFFICULTY")));

        difficultyUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        difficultyUIE.SetLocation(7.5f, offset, 3, 1);
        difficultyUIE.SetText(game.quest.qd.quest.difficulty.ToString());
        difficultyUIE.SetSingleLine();
        difficultyUIE.SetButton(delegate { UpdateDifficulty(); });
        new UIElementBorder(difficultyUIE);
        offset += 2;

        return(offset);
    }
コード例 #5
0
    override public float AddSubEventComponents(float offset)
    {
        spawnComponent = component as QuestData.Spawn;

        UIElement ui = null;

        if (game.gameType is D2EGameType)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 6, 1);
            ui.SetText(new StringKey("val", "X_COLON", MONSTER_UNIQUE));

            if (!spawnComponent.unique)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(6, offset, 3, 1);
                ui.SetText(CommonStringKeys.FALSE);
                ui.SetButton(delegate { UniqueToggle(); });
                new UIElementBorder(ui);
                offset += 2;
            }
            else
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(6, offset, 3, 1);
                ui.SetText(CommonStringKeys.TRUE);
                ui.SetButton(delegate { UniqueToggle(); });
                new UIElementBorder(ui);
                offset += 2;

                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(0, offset, 5, 1);
                ui.SetText(new StringKey("val", "X_COLON", UNIQUE_TITLE));

                uniqueTitleUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
                uniqueTitleUIE.SetLocation(5, offset, 14.5f, 1);
                uniqueTitleUIE.SetText(spawnComponent.uniqueTitle.Translate());
                uniqueTitleUIE.SetSingleLine();
                uniqueTitleUIE.SetButton(delegate { UpdateUniqueTitle(); });
                new UIElementBorder(uniqueTitleUIE);
                offset += 2;

                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(0, offset++, 20, 1);
                ui.SetText(new StringKey("val", "X_COLON", UNIQUE_INFO));

                uniqueTextUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
                uniqueTextUIE.SetLocation(0.5f, offset, 19, 18);
                uniqueTextUIE.SetText(spawnComponent.uniqueText.Translate());
                offset += uniqueTextUIE.HeightToTextPadding(1);
                uniqueTextUIE.SetButton(delegate { UpdateUniqueText(); });
                new UIElementBorder(uniqueTextUIE);
                offset += 1;
            }
        }

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 5, 1);
        ui.SetText(new StringKey("val", "X_COLON", HEALTH));

        healthUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        healthUIE.SetLocation(5, offset, 3, 1);
        healthUIE.SetText(spawnComponent.uniqueHealthBase.ToString());
        healthUIE.SetSingleLine();
        healthUIE.SetButton(delegate { UpdateHealth(); });
        new UIElementBorder(healthUIE);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(8, offset, 7, 1);
        ui.SetText(new StringKey("val", "X_COLON", HEALTH_HERO));

        healthHeroUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        healthHeroUIE.SetLocation(15, offset, 3, 1);
        healthHeroUIE.SetText(spawnComponent.uniqueHealthHero.ToString());
        healthHeroUIE.SetSingleLine();
        healthHeroUIE.SetButton(delegate { UpdateHealthHero(); });
        new UIElementBorder(healthHeroUIE);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(1.5f, offset, 17, 1);
        ui.SetText(new StringKey("val", "X_COLON", TYPES));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(18.5f, offset++, 1, 1);
        ui.SetText(CommonStringKeys.PLUS, Color.green);
        ui.SetButton(delegate { MonsterTypeAdd(0); });
        new UIElementBorder(ui, Color.green);

        int i = 0;

        for (i = 0; i < spawnComponent.mTypes.Length; i++)
        {
            int    mSlot = i;
            string mName = spawnComponent.mTypes[i];
            if (mName.IndexOf("Monster") == 0)
            {
                mName = mName.Substring("Monster".Length);
            }

            if ((spawnComponent.mTypes.Length > 1) || (spawnComponent.mTraitsRequired.Length > 0) || (spawnComponent.mTraitsPool.Length > 0))
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(0.5f, offset, 1, 1);
                ui.SetText(CommonStringKeys.MINUS, Color.red);
                ui.SetButton(delegate { MonsterTypeRemove(mSlot); });
                new UIElementBorder(ui, Color.red);
            }

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            if (game.quest.qd.components.ContainsKey(spawnComponent.mTypes[i]))
            {
                ui.SetLocation(1.5f, offset, 16, 1);
                UIElement link = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                link.SetLocation(17.5f, offset, 1, 1);
                link.SetText("<b>⇨</b>", Color.cyan);
                link.SetTextAlignment(TextAnchor.LowerCenter);
                link.SetButton(delegate { QuestEditorData.SelectComponent(spawnComponent.mTypes[mSlot]); });
                new UIElementBorder(link, Color.cyan);
            }
            else
            {
                ui.SetLocation(1.5f, offset, 17, 1);
            }
            ui.SetText(mName);
            ui.SetButton(delegate { MonsterTypeReplace(mSlot); });
            new UIElementBorder(ui);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(18.5f, offset++, 1, 1);
            ui.SetText(CommonStringKeys.PLUS, Color.green);
            ui.SetButton(delegate { MonsterTypeAdd(mSlot + 1); });
            new UIElementBorder(ui, Color.green);
        }
        offset++;

        float traitOffset = offset;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset, 8, 1);
        ui.SetText(REQ_TRAITS);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(8.5f, offset++, 1, 1);
        ui.SetText(CommonStringKeys.PLUS, Color.green);
        ui.SetButton(delegate { MonsterTraitsAdd(); });
        new UIElementBorder(ui, Color.green);

        for (i = 0; i < spawnComponent.mTraitsRequired.Length; i++)
        {
            int    mSlot = i;
            string mName = spawnComponent.mTraitsRequired[i];

            if ((spawnComponent.mTypes.Length > 0) || (spawnComponent.mTraitsRequired.Length > 1) || (spawnComponent.mTraitsPool.Length > 0))
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(0.5f, offset, 1, 1);
                ui.SetText(CommonStringKeys.MINUS, Color.red);
                ui.SetButton(delegate { MonsterTraitsRemove(mSlot); });
                new UIElementBorder(ui, Color.red);
            }

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(1.5f, offset++, 8, 1);
            ui.SetText(new StringKey("val", mName));
            ui.SetButton(delegate { MonsterTraitReplace(mSlot); });
            new UIElementBorder(ui);
        }

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(10.5f, traitOffset, 8, 1);
        ui.SetText(POOL_TRAITS);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(18.5f, traitOffset++, 1, 1);
        ui.SetText(CommonStringKeys.PLUS, Color.green);
        ui.SetButton(delegate { MonsterTraitsAdd(true); });
        new UIElementBorder(ui, Color.green);

        for (int j = 0; j < spawnComponent.mTraitsPool.Length; j++)
        {
            int    mSlot = j;
            string mName = spawnComponent.mTraitsPool[j];

            if ((spawnComponent.mTypes.Length > 0) || (spawnComponent.mTraitsRequired.Length > 0) || (spawnComponent.mTraitsPool.Length > 1))
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(10.5f, traitOffset, 1, 1);
                ui.SetText(CommonStringKeys.MINUS, Color.red);
                ui.SetButton(delegate { MonsterTraitsRemove(mSlot, true); });
                new UIElementBorder(ui, Color.red);
            }

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(11.5f, traitOffset++, 8, 1);
            ui.SetText(new StringKey("val", mName));
            ui.SetButton(delegate { MonsterTraitReplace(mSlot, true); });
            new UIElementBorder(ui);
        }

        if (traitOffset > offset)
        {
            offset = traitOffset;
        }

        offset++;
        if (game.gameType is D2EGameType || game.gameType is IAGameType)
        {
            offset = AddPlacementComponenets(offset);
        }

        return(offset);
    }
コード例 #6
0
    override public float AddSubEventComponents(float offset)
    {
        uiComponent = component as QuestData.UI;

        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0, offset, 4.5f, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "IMAGE")));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(5, offset, 14, 1);
        ui.SetText(uiComponent.imageName);
        ui.SetButton(delegate { SetImage(); });
        new UIElementBorder(ui);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 6, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "UNITS")));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(6, offset, 6, 1);
        ui.SetButton(delegate { ChangeUnits(); });
        new UIElementBorder(ui);
        if (uiComponent.verticalUnits)
        {
            ui.SetText(new StringKey("val", "VERTICAL"));
        }
        else
        {
            ui.SetText(new StringKey("val", "HORIZONTAL"));
        }
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset++, 4, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "ALIGN")));

        DrawAlignSelection(offset, -1, -1, "┏");
        DrawAlignSelection(offset, 0, -1, "━");
        DrawAlignSelection(offset, 1, -1, "┓");

        DrawAlignSelection(offset, -1, 0, "┃");
        DrawAlignSelection(offset, 0, 0, "╋");
        DrawAlignSelection(offset, 1, 0, "┃");

        DrawAlignSelection(offset, -1, 1, "┗");
        DrawAlignSelection(offset, 0, 1, "━");
        DrawAlignSelection(offset, 1, 1, "┛");
        offset += 3;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset++, 10, 1);
        ui.SetText(new StringKey("val", "POSITION"));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 2, 1);
        ui.SetText("X:");

        locXUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        locXUIE.SetLocation(2, offset, 3, 1);
        locXUIE.SetText(uiComponent.location.x.ToString());
        locXUIE.SetSingleLine();
        locXUIE.SetButton(delegate { UpdateNumbers(); });
        new UIElementBorder(locXUIE);

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(5, offset, 2, 1);
        ui.SetText("Y:");

        locYUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        locYUIE.SetLocation(7, offset, 3, 1);
        locYUIE.SetText(uiComponent.location.y.ToString());
        locYUIE.SetSingleLine();
        locYUIE.SetButton(delegate { UpdateNumbers(); });
        new UIElementBorder(locYUIE);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 5, 1);
        ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "SIZE")));

        sizeUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
        sizeUIE.SetLocation(5, offset, 3, 1);
        sizeUIE.SetText(uiComponent.size.ToString());
        sizeUIE.SetSingleLine();
        sizeUIE.SetButton(delegate { UpdateNumbers(); });
        new UIElementBorder(sizeUIE);

        if (uiComponent.imageName.Length == 0)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(10, offset, 5, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "ASPECT")));

            aspectUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
            aspectUIE.SetLocation(15, offset, 3, 1);
            aspectUIE.SetText(uiComponent.aspect.ToString());
            aspectUIE.SetSingleLine();
            aspectUIE.SetButton(delegate { UpdateNumbers(); });
            new UIElementBorder(aspectUIE);
            offset += 2;

            textUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
            textUIE.SetLocation(0.5f, offset, 19, 38);
            textUIE.SetText(uiComponent.uiText.Translate(true));
            offset += textUIE.HeightToTextPadding(1);
            textUIE.SetButton(delegate { UpdateUIText(); });
            new UIElementBorder(textUIE);
            offset += 1;

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 7, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "RICH_TEXT")));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(7, offset, 3, 1);
            ui.SetButton(delegate { SetRichText(); });
            if (uiComponent.richText)
            {
                ui.SetText(new StringKey("val", "TRUE"));
            }
            else
            {
                ui.SetText(new StringKey("val", "FALSE"));
            }
            new UIElementBorder(ui);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(10, offset, 4.5f, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "TEXT_ALIGNMENT")));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(14.5f, offset, 5, 1);
            ui.SetText(new StringKey("val", uiComponent.textAlignment.ToString()));
            ui.SetButton(delegate { SetTextAlignment(); });
            new UIElementBorder(ui);
            offset += 2;

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 7, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "TEXT_SIZE")));

            textSizeUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
            textSizeUIE.SetLocation(7, offset, 3, 1);
            textSizeUIE.SetText(uiComponent.textSize.ToString());
            textSizeUIE.SetSingleLine();
            textSizeUIE.SetButton(delegate { UpdateTextSize(); });
            new UIElementBorder(textSizeUIE);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(10, offset, 4.5f, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "COLOR")));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(14.5f, offset, 5, 1);
            ui.SetText(new StringKey("val", uiComponent.textColor));
            ui.SetButton(delegate { SetColour(); });
            new UIElementBorder(ui);
            offset += 2;

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 8.5f, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "BACKGROUND_COLOUR")));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(8.5f, offset, 4.5f, 1);
            ui.SetText(new StringKey("val", uiComponent.textBackgroundColor));
            ui.SetButton(delegate { SetBackgroundColour(); });
            new UIElementBorder(ui);
            offset += 2;

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0.5f, offset, 8, 1);
            ui.SetText(uiComponent.textColor);
            ui.SetButton(delegate { ToggleBorder(); });
            new UIElementBorder(ui);
            if (uiComponent.border)
            {
                ui.SetText(new StringKey("val", "BORDER"));
            }
            else
            {
                ui.SetText(new StringKey("val", "NO_BORDER"));
            }
        }
        offset += 2;

        DrawUIComponent();

        return(offset);
    }
コード例 #7
0
    public float D2EActivation(float offset)
    {
        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0.5f, offset++, 19, 1);
        ui.SetText(new StringKey("val", "X_COLON", ABILITY));

        abilityUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        abilityUIE.SetLocation(0.5f, offset, 19, 8);
        abilityUIE.SetText(activationComponent.ability.Translate());
        abilityUIE.SetButton(delegate { UpdateAbility(); });
        new UIElementBorder(abilityUIE);
        offset += 9;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset, 14, 1);
        ui.SetText(new StringKey("val", "X_COLON", MONSTER_MASTER));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(14.5f, offset++, 5, 1);
        ui.SetButton(delegate { ToggleMasterFirst(); });
        new UIElementBorder(ui);
        if (activationComponent.masterFirst)
        {
            ui.SetText(FIRST);
        }
        else
        {
            ui.SetText(NOT_FIRST);
        }

        masterActionsUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        masterActionsUIE.SetLocation(0.5f, offset, 19, 8);
        masterActionsUIE.SetText(activationComponent.masterActions.Translate(true));
        masterActionsUIE.SetButton(delegate { UpdateMasterActions(); });
        new UIElementBorder(masterActionsUIE);
        offset += 9;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0.5f, offset, 14, 1);
        ui.SetText(new StringKey("val", "X_COLON", MONSTER_MINION));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(14.5f, offset++, 5, 1);
        ui.SetButton(delegate { ToggleMinionFirst(); });
        new UIElementBorder(ui);
        if (activationComponent.minionFirst)
        {
            ui.SetText(FIRST);
        }
        else
        {
            ui.SetText(NOT_FIRST);
        }

        minionActionsUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
        minionActionsUIE.SetLocation(0.5f, offset, 19, 8);
        minionActionsUIE.SetText(activationComponent.minionActions.Translate(true));
        minionActionsUIE.SetButton(delegate { UpdateMinionActions(); });
        new UIElementBorder(minionActionsUIE);

        return(offset + 9);
    }
コード例 #8
0
    override public float AddSubComponents(float offset)
    {
        Game game = Game.Get();

        UIElement ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());

        ui.SetLocation(0, offset, 3, 1);
        ui.SetText(new StringKey("val", "X_COLON", BASE));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(3, offset, 16.5f, 1);
        ui.SetText(monsterComponent.baseMonster);
        ui.SetButton(delegate { SetBase(); });
        new UIElementBorder(ui);
        offset += 2;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 3, 1);
        ui.SetText(new StringKey("val", "X_COLON", NAME));

        if (monsterComponent.baseMonster.Length == 0 || monsterComponent.monsterName.KeyExists())
        {
            nameUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
            nameUIE.SetLocation(3, offset, 13.5f, 1);
            nameUIE.SetText(monsterComponent.monsterName.Translate());
            nameUIE.SetSingleLine();
            nameUIE.SetButton(delegate { UpdateName(); });
            new UIElementBorder(nameUIE);
            if (monsterComponent.baseMonster.Length > 0)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(16.5f, offset, 3, 1);
                ui.SetText(CommonStringKeys.RESET);
                ui.SetButton(delegate { ClearName(); });
                new UIElementBorder(ui);
            }
        }
        else
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(16.5f, offset, 3, 1);
            ui.SetText(CommonStringKeys.SET);
            ui.SetButton(delegate { SetName(); });
            new UIElementBorder(ui);
        }
        offset += 2;

        if (game.gameType is D2EGameType)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0.5f, offset, 16, 1);
            ui.SetText(new StringKey("val", "X_COLON", INFO));

            if (monsterComponent.baseMonster.Length == 0 || monsterComponent.info.KeyExists())
            {
                if (monsterComponent.baseMonster.Length > 0)
                {
                    ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                    ui.SetLocation(16.5f, offset++, 3, 1);
                    ui.SetText(CommonStringKeys.RESET);
                    ui.SetButton(delegate { ClearInfo(); });
                    new UIElementBorder(ui);
                }

                infoUIE = new UIElementEditablePaneled(Game.EDITOR, scrollArea.GetScrollTransform());
                infoUIE.SetLocation(0.5f, offset, 19, 18);
                infoUIE.SetText(monsterComponent.info.Translate());
                offset += infoUIE.HeightToTextPadding(1);
                infoUIE.SetButton(delegate { UpdateInfo(); });
                new UIElementBorder(infoUIE);
            }
            else
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(16.5f, offset++, 3, 1);
                ui.SetText(CommonStringKeys.SET);
                ui.SetButton(delegate { SetInfo(); });
                new UIElementBorder(ui);
            }
            offset++;

            offset = DrawD2EActivations(offset);
        }
        else
        {
            offset = DrawMoMActivations(offset);
        }

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(12.5f, offset, 6, 1);
        ui.SetText(new StringKey("val", "X_COLON", CommonStringKeys.TRAITS));

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(18.5f, offset++, 1, 1);
        ui.SetText(CommonStringKeys.PLUS, Color.green);
        ui.SetButton(delegate { AddTrait(); });
        new UIElementBorder(ui, Color.green);

        for (int index = 0; index < monsterComponent.traits.Length; index++)
        {
            int i = index;
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(12.5f, offset, 6, 1);
            ui.SetText(new StringKey("val", monsterComponent.traits[index]));
            new UIElementBorder(ui);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(18.5f, offset++, 1, 1);
            ui.SetText(CommonStringKeys.MINUS, Color.red);
            ui.SetButton(delegate { RemoveTrait(i); });
            new UIElementBorder(ui, Color.red);
        }
        offset += 1;

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 5, 1);
        ui.SetText(new StringKey("val", "X_COLON", HEALTH));

        if (monsterComponent.baseMonster.Length == 0 || monsterComponent.healthDefined)
        {
            healthUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
            healthUIE.SetLocation(5, offset, 3, 1);
            healthUIE.SetText(monsterComponent.healthBase.ToString());
            healthUIE.SetSingleLine();
            healthUIE.SetButton(delegate { UpdateHealth(); });
            new UIElementBorder(healthUIE);

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(8, offset, 6, 1);
            ui.SetText(new StringKey("val", "X_COLON", HEALTH_HERO));

            healthHeroUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
            healthHeroUIE.SetLocation(14, offset, 2.5f, 1);
            healthHeroUIE.SetText(monsterComponent.healthPerHero.ToString());
            healthHeroUIE.SetSingleLine();
            healthHeroUIE.SetButton(delegate { UpdateHealthHero(); });
            new UIElementBorder(healthHeroUIE);
            if (monsterComponent.baseMonster.Length > 0)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(16.5f, offset, 3, 1);
                ui.SetText(CommonStringKeys.RESET);
                ui.SetButton(delegate { ClearHealth(); });
                new UIElementBorder(ui);
            }
        }
        else
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(16.5f, offset, 3, 1);
            ui.SetText(CommonStringKeys.SET);
            ui.SetButton(delegate { SetHealth(); });
            new UIElementBorder(ui);
        }
        offset += 2;

        if (game.gameType is MoMGameType)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 7, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "horror")));

            if (monsterComponent.baseMonster.Length == 0 || monsterComponent.horrorDefined)
            {
                horrorUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
                horrorUIE.SetLocation(7, offset, 3, 1);
                horrorUIE.SetText(monsterComponent.horror.ToString());
                horrorUIE.SetSingleLine();
                horrorUIE.SetButton(delegate { UpdateHorror(); });
                new UIElementBorder(horrorUIE);

                if (monsterComponent.baseMonster.Length > 0)
                {
                    ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                    ui.SetLocation(10, offset, 3, 1);
                    ui.SetText(CommonStringKeys.RESET);
                    ui.SetButton(delegate { ClearHorror(); });
                    new UIElementBorder(ui);
                }
            }
            else
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(10, offset, 3, 1);
                ui.SetText(CommonStringKeys.SET);
                ui.SetButton(delegate { SetHorror(); });
                new UIElementBorder(ui);
            }
            offset += 2;

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 7, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "AWARENESS")));

            if (monsterComponent.baseMonster.Length == 0 || monsterComponent.awarenessDefined)
            {
                awarenessUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
                awarenessUIE.SetLocation(7, offset, 3, 1);
                awarenessUIE.SetText(monsterComponent.awareness.ToString());
                awarenessUIE.SetSingleLine();
                awarenessUIE.SetButton(delegate { UpdateAwareness(); });
                new UIElementBorder(awarenessUIE);

                if (monsterComponent.baseMonster.Length > 0)
                {
                    ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                    ui.SetLocation(10, offset, 3, 1);
                    ui.SetText(CommonStringKeys.RESET);
                    ui.SetButton(delegate { ClearAwareness(); });
                    new UIElementBorder(ui);
                }
            }
            else
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(10, offset, 3, 1);
                ui.SetText(CommonStringKeys.SET);
                ui.SetButton(delegate { SetAwareness(); });
                new UIElementBorder(ui);
            }
            offset += 2;

            offset = DrawInvestigatorAttacks(offset);
        }

        ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
        ui.SetLocation(0, offset, 3, 1);
        ui.SetText(new StringKey("val", "X_COLON", IMAGE));
        if (monsterComponent.baseMonster.Length == 0 || monsterComponent.imagePath.Length > 0)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(3, offset, 13.5f, 1);
            ui.SetText(monsterComponent.imagePath);
            ui.SetButton(delegate { SetImage(); });
            new UIElementBorder(ui);
            if (monsterComponent.baseMonster.Length > 0)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(16.5f, offset, 3, 1);
                ui.SetText(CommonStringKeys.RESET);
                ui.SetButton(delegate { ClearImage(); });
                new UIElementBorder(ui);
            }
        }
        else
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(16.5f, offset, 3, 1);
            ui.SetText(CommonStringKeys.SET);
            ui.SetButton(delegate { SetImage(); });
            new UIElementBorder(ui);
        }
        offset += 2;

        if (game.gameType is D2EGameType)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 4, 1);
            ui.SetText(new StringKey("val", "X_COLON", PLACE_IMG));
            if (monsterComponent.baseMonster.Length == 0 || monsterComponent.imagePlace.Length > 0)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(4, offset, 12.5f, 1);
                ui.SetText(monsterComponent.imagePlace);
                ui.SetButton(delegate { SetImagePlace(); });
                new UIElementBorder(ui);
                if (monsterComponent.baseMonster.Length > 0)
                {
                    ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                    ui.SetLocation(16.5f, offset, 3, 1);
                    ui.SetText(CommonStringKeys.RESET);
                    ui.SetButton(delegate { ClearImagePlace(); });
                    new UIElementBorder(ui);
                }
            }
            else
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(16.5f, offset, 3, 1);
                ui.SetText(CommonStringKeys.SET);
                ui.SetButton(delegate { SetImagePlace(); });
                new UIElementBorder(ui);
            }
            offset += 2;
        }

        if (game.gameType is MoMGameType)
        {
            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 5, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "EVADE")));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(5, offset, 13.5f, 1);
            ui.SetText(monsterComponent.evadeEvent);
            ui.SetButton(delegate { SetEvade(); });
            new UIElementBorder(ui);

            if (monsterComponent.evadeEvent.Length > 0)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(18.5f, offset, 1, 1);
                ui.SetText("<b>⇨</b>", Color.cyan);
                ui.SetTextAlignment(TextAnchor.LowerCenter);
                ui.SetButton(delegate { QuestEditorData.SelectComponent(monsterComponent.evadeEvent); });
                new UIElementBorder(ui, Color.cyan);
            }
            offset += 2;

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(0, offset, 5, 1);
            ui.SetText(new StringKey("val", "X_COLON", new StringKey("val", "horror")));

            ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
            ui.SetLocation(5, offset, 13.5f, 1);
            ui.SetText(monsterComponent.horrorEvent);
            ui.SetButton(delegate { SetHorrorEvent(); });
            new UIElementBorder(ui);

            if (monsterComponent.horrorEvent.Length > 0)
            {
                ui = new UIElement(Game.EDITOR, scrollArea.GetScrollTransform());
                ui.SetLocation(18.5f, offset, 1, 1);
                ui.SetTextAlignment(TextAnchor.LowerCenter);
                ui.SetText("<b>⇨</b>", Color.cyan);
                ui.SetButton(delegate { QuestEditorData.SelectComponent(monsterComponent.horrorEvent); });
                new UIElementBorder(ui, Color.cyan);
            }
            offset += 2;
        }

        return(offset);
    }