Пример #1
0
        public override void OnInitialize()
        {
            mainPanel = new UIPanel();
            mainPanel.BackgroundColor = new Color(28, 36, 66) * 0.95f;
            mainPanel.Width.Set(440, 0f);
            mainPanel.Height.Set(310, 0f);
            mainPanel.HAlign = 0.5f;
            mainPanel.VAlign = 0.5f;

            Append(mainPanel);

            spriteContainer = new UIPanel();
            spriteContainer.BackgroundColor = new Color(20, 25, 46) * 1f;
            spriteContainer.Width.Set(148, 0f);
            spriteContainer.Height.Set(110, 0f);
            spriteContainer.HAlign = 0.1f;
            spriteContainer.VAlign = 0.46f;

            gender = new SummaryImage(ModContent.GetTexture("Terramon/UI/Summary/" + "Male"), "Male");
            gender.Top.Set(-4, 0f);
            gender.Left.Set(-14, 1f);

            spriteContainer.Append(gender);

            caughtBall = new SummaryImage(ModContent.GetTexture("Terramon/Minisprites/Ball1"), "Caught in a Poké Ball");
            caughtBall.Top.Set(-12, 1f);
            caughtBall.Left.Set(-14, 1f);

            spriteContainer.Append(caughtBall);

            Texture2D overworldTexture = ModContent.GetTexture($"Terramon/Pokemon/FirstGeneration/Normal/{target}/{target}");

            overworldSprite        = new SummarySprite(overworldTexture);
            overworldSprite.HAlign = 0.5f;
            overworldSprite.VAlign = 0.5f;

            spriteContainer.Append(overworldSprite);

            name = new UIText("Charmeleon", 0.55f, true);
            name.Top.Set(-41, 0f);
            name.Left.Set(-2, 0f);

            lv = new UIText("Lv 16", 0.75f, false);

            spriteContainer.Append(name);
            spriteContainer.Append(lv);

            trainerMemoHeader        = new UIText("Trainer Memo", 0.35f, true);
            trainerMemoHeader.HAlign = 0.5f;
            trainerMemoHeader.Top.Set(34, 1f);
            spriteContainer.Append(trainerMemoHeader);

            memo1        = new UIText("Adamant nature.", 0.3f, true);
            memo1.HAlign = 0.5f;
            memo1.Top.Set(54, 1f);
            spriteContainer.Append(memo1);

            memo2        = new UIText("Caught in the cavern layer", 0.3f, true);
            memo2.HAlign = 0.5f;
            memo2.Top.Set(68, 1f);
            spriteContainer.Append(memo2);

            memo3        = new UIText("at Lv 5.", 0.3f, true);
            memo3.HAlign = 0.5f;
            memo3.Top.Set(82, 1f);
            spriteContainer.Append(memo3);

            mainPanel.Append(spriteContainer);

            headingPanel = new UIPanel();
            headingPanel.BackgroundColor = new Color(63, 82, 151) * 1f;
            headingPanel.Width.Set(340, 0f);
            headingPanel.Height.Set(64, 0f);
            headingPanel.HAlign = 0.5f;
            headingPanel.Top.Set(-38, 0f);

            UIText text = new UIText("Pokémon Summary", 0.8f, true);

            text.HAlign = 0.5f;
            text.VAlign = 0.5f;
            headingPanel.Append(text);

            mainPanel.Append(headingPanel);

            Append(TerramonMod.ZoomAnimator = new Animator());

            base.OnInitialize();
        }
Пример #2
0
        public override void OnInitialize()
        {
            mainPanel = new UIPanel();
            mainPanel.BackgroundColor = new Color(28, 36, 66) * 0.95f;
            mainPanel.Width.Set(440, 0f);
            mainPanel.Height.Set(310, 0f);
            mainPanel.HAlign = 0.5f;
            mainPanel.VAlign = 0.5f;

            //Append(mainPanel);

            spriteContainer = new UIPanel();
            spriteContainer.BackgroundColor = new Color(20, 25, 46) * 1f;
            spriteContainer.Width.Set(148, 0f);
            spriteContainer.Height.Set(110, 0f);
            spriteContainer.HAlign = 0.1f;
            spriteContainer.VAlign = 0.46f;

            gender = new SummaryImage(ModContent.GetTexture("Terramon/UI/Summary/" + "Male"), "Male");
            gender.Top.Set(-4, 0f);
            gender.Left.Set(-14, 1f);

            //spriteContainer.Append(gender);

            caughtBall = new SummaryImage(ModContent.GetTexture("Terramon/Minisprites/Ball1"), "Caught in a Poké Ball");
            caughtBall.Top.Set(-12, 1f);
            caughtBall.Left.Set(-14, 1f);

            //spriteContainer.Append(caughtBall);

            Texture2D overworldTexture = ModContent.GetTexture($"Terramon/Pokemon/FirstGeneration/Normal/{target}/{target}");

            overworldSprite        = new SummarySprite(overworldTexture);
            overworldSprite.HAlign = 0.5f;
            overworldSprite.VAlign = 0.5f;

            //spriteContainer.Append(overworldSprite);

            name = new UIText("Charmeleon", 0.55f, true);
            name.Top.Set(-41, 0f);
            name.Left.Set(-2, 0f);

            lv = new UIText("Lv 16", 0.75f, false);

            //spriteContainer.Append(name);
            //spriteContainer.Append(lv);

            trainerMemoHeader        = new UIText("Trainer Memo", 0.35f, true);
            trainerMemoHeader.HAlign = 0.5f;
            trainerMemoHeader.Top.Set(34, 1f);
            //spriteContainer.Append(trainerMemoHeader);

            memo1        = new UIText("Adamant nature.", 0.3f, true);
            memo1.HAlign = 0.5f;
            memo1.Top.Set(54, 1f);
            //spriteContainer.Append(memo1);

            memo2        = new UIText("Caught in the cavern layer", 0.3f, true);
            memo2.HAlign = 0.5f;
            memo2.Top.Set(68, 1f);
            //spriteContainer.Append(memo2);

            memo3        = new UIText("at Lv 5.", 0.3f, true);
            memo3.HAlign = 0.5f;
            memo3.Top.Set(82, 1f);
            //spriteContainer.Append(memo3);

            //mainPanel.Append(spriteContainer);

            headingPanel = new UIPanel();
            headingPanel.BackgroundColor = new Color(63, 82, 151) * 1f;
            headingPanel.Width.Set(340, 0f);
            headingPanel.Height.Set(64, 0f);
            headingPanel.HAlign = 0.5f;
            headingPanel.Top.Set(-38, 0f);

            UIText text = new UIText("Pokémon Summary", 0.8f, true);

            text.HAlign = 0.5f;
            text.VAlign = 0.5f;
            //headingPanel.Append(text);

            //mainPanel.Append(headingPanel);

            // == Pokédex UI ==

            pokedexTexture        = new UIImage(ModContent.GetTexture("Terramon/UI/Pokedex/Pokedex"));
            pokedexTexture.HAlign = 0.5f;
            pokedexTexture.VAlign = 3.8f;
            Append(pokedexTexture);

            pokedexText        = new UIText("Pokédex", 0.65f, true);
            pokedexText.HAlign = 0.5f;
            pokedexText.Top.Set(50, 0f);
            pokedexTexture.Append(pokedexText);

            pokedexShowingNumbers        = new UIText("Showing No. 001-018", 1f, false);
            pokedexShowingNumbers.HAlign = 0.185f;
            pokedexShowingNumbers.Top.Set(30, 0f);
            pokedexTexture.Append(pokedexShowingNumbers);

            pokedexPercentComplete        = new UIText("100% Completed", 1f, false);
            pokedexPercentComplete.HAlign = 0.795f;
            pokedexPercentComplete.Top.Set(30, 0f);
            pokedexTexture.Append(pokedexPercentComplete);

            upArrow = new DexArrow(DexArrowDirection.Up);
            upArrow.Left.Set(588, 0f);
            upArrow.Top.Set(135, 0f);
            pokedexTexture.Append(upArrow);

            downArrow = new DexArrow(DexArrowDirection.Down);
            downArrow.Left.Set(588, 0f);
            downArrow.Top.Set(250, 0f);
            pokedexTexture.Append(downArrow);

            dexSlot1 = new DexSlot(1);
            dexSlot1.Top.Set(84, 0f);
            dexSlot1.Left.Set(129, 0f);
            pokedexTexture.Append(dexSlot1);

            dexSlot1x = new DexSlotHitbox(1);
            dexSlot1x.Left.Set(131, 0f);
            dexSlot1x.Top.Set(103, 0f);
            pokedexTexture.Append(dexSlot1x);

            dexSlot2 = new DexSlot(2);
            dexSlot2.Top.Set(84, 0f);
            dexSlot2.Left.Set(204, 0f);
            pokedexTexture.Append(dexSlot2);

            dexSlot2x = new DexSlotHitbox(2);
            dexSlot2x.Left.Set(206, 0f);
            dexSlot2x.Top.Set(103, 0f);
            pokedexTexture.Append(dexSlot2x);

            dexSlot3 = new DexSlot(3);
            dexSlot3.Top.Set(84, 0f);
            dexSlot3.Left.Set(279, 0f);
            pokedexTexture.Append(dexSlot3);

            dexSlot3x = new DexSlotHitbox(3);
            dexSlot3x.Left.Set(281, 0f);
            dexSlot3x.Top.Set(103, 0f);
            pokedexTexture.Append(dexSlot3x);

            dexSlot4 = new DexSlot(4);
            dexSlot4.Top.Set(84, 0f);
            dexSlot4.Left.Set(354, 0f);
            pokedexTexture.Append(dexSlot4);

            dexSlot4x = new DexSlotHitbox(4);
            dexSlot4x.Left.Set(356, 0f);
            dexSlot4x.Top.Set(103, 0f);
            pokedexTexture.Append(dexSlot4x);

            dexSlot5 = new DexSlot(5);
            dexSlot5.Top.Set(84, 0f);
            dexSlot5.Left.Set(429, 0f);
            pokedexTexture.Append(dexSlot5);

            dexSlot5x = new DexSlotHitbox(5);
            dexSlot5x.Left.Set(431, 0f);
            dexSlot5x.Top.Set(103, 0f);
            pokedexTexture.Append(dexSlot5x);

            dexSlot6 = new DexSlot(6);
            dexSlot6.Top.Set(84, 0f);
            dexSlot6.Left.Set(504, 0f);
            pokedexTexture.Append(dexSlot6);

            dexSlot6x = new DexSlotHitbox(6);
            dexSlot6x.Left.Set(506, 0f);
            dexSlot6x.Top.Set(103, 0f);
            pokedexTexture.Append(dexSlot6x);

            dexSlot7 = new DexSlot(7);
            dexSlot7.Top.Set(158, 0f); // + 74
            dexSlot7.Left.Set(129, 0f);
            pokedexTexture.Append(dexSlot7);

            dexSlot7x = new DexSlotHitbox(7);
            dexSlot7x.Left.Set(131, 0f);
            dexSlot7x.Top.Set(177, 0f);
            pokedexTexture.Append(dexSlot7x);

            dexSlot8 = new DexSlot(8);
            dexSlot8.Top.Set(158, 0f);
            dexSlot8.Left.Set(204, 0f);
            pokedexTexture.Append(dexSlot8);

            dexSlot8x = new DexSlotHitbox(8);
            dexSlot8x.Left.Set(206, 0f);
            dexSlot8x.Top.Set(177, 0f);
            pokedexTexture.Append(dexSlot8x);

            dexSlot9 = new DexSlot(9);
            dexSlot9.Top.Set(158, 0f);
            dexSlot9.Left.Set(279, 0f);
            pokedexTexture.Append(dexSlot9);

            dexSlot9x = new DexSlotHitbox(9);
            dexSlot9x.Left.Set(281, 0f);
            dexSlot9x.Top.Set(177, 0f);
            pokedexTexture.Append(dexSlot9x);

            dexSlot10 = new DexSlot(10);
            dexSlot10.Top.Set(158, 0f);
            dexSlot10.Left.Set(354, 0f);
            pokedexTexture.Append(dexSlot10);

            dexSlot10x = new DexSlotHitbox(10);
            dexSlot10x.Left.Set(356, 0f);
            dexSlot10x.Top.Set(177, 0f);
            pokedexTexture.Append(dexSlot10x);

            dexSlot11 = new DexSlot(11);
            dexSlot11.Top.Set(158, 0f);
            dexSlot11.Left.Set(429, 0f);
            pokedexTexture.Append(dexSlot11);

            dexSlot11x = new DexSlotHitbox(11);
            dexSlot11x.Left.Set(431, 0f);
            dexSlot11x.Top.Set(177, 0f);
            pokedexTexture.Append(dexSlot11x);

            dexSlot12 = new DexSlot(12);
            dexSlot12.Top.Set(158, 0f);
            dexSlot12.Left.Set(504, 0f);
            pokedexTexture.Append(dexSlot12);

            dexSlot12x = new DexSlotHitbox(12);
            dexSlot12x.Left.Set(506, 0f);
            dexSlot12x.Top.Set(177, 0f);
            pokedexTexture.Append(dexSlot12x);

            dexSlot13 = new DexSlot(13);
            dexSlot13.Top.Set(232, 0f); // + 74
            dexSlot13.Left.Set(129, 0f);
            pokedexTexture.Append(dexSlot13);

            dexSlot13x = new DexSlotHitbox(13);
            dexSlot13x.Left.Set(131, 0f);
            dexSlot13x.Top.Set(250, 0f);
            pokedexTexture.Append(dexSlot13x);

            dexSlot14 = new DexSlot(14);
            dexSlot14.Top.Set(232, 0f);
            dexSlot14.Left.Set(204, 0f);
            pokedexTexture.Append(dexSlot14);

            dexSlot14x = new DexSlotHitbox(14);
            dexSlot14x.Left.Set(206, 0f);
            dexSlot14x.Top.Set(250, 0f);
            pokedexTexture.Append(dexSlot14x);

            dexSlot15 = new DexSlot(15);
            dexSlot15.Top.Set(232, 0f);
            dexSlot15.Left.Set(279, 0f);
            pokedexTexture.Append(dexSlot15);

            dexSlot15x = new DexSlotHitbox(15);
            dexSlot15x.Left.Set(281, 0f);
            dexSlot15x.Top.Set(250, 0f);
            pokedexTexture.Append(dexSlot15x);

            dexSlot16 = new DexSlot(16);
            dexSlot16.Top.Set(232, 0f);
            dexSlot16.Left.Set(354, 0f);
            pokedexTexture.Append(dexSlot16);

            dexSlot16x = new DexSlotHitbox(16);
            dexSlot16x.Left.Set(356, 0f);
            dexSlot16x.Top.Set(250, 0f);
            pokedexTexture.Append(dexSlot16x);

            dexSlot17 = new DexSlot(17);
            dexSlot17.Top.Set(232, 0f);
            dexSlot17.Left.Set(429, 0f);
            pokedexTexture.Append(dexSlot17);

            dexSlot17x = new DexSlotHitbox(17);
            dexSlot17x.Left.Set(431, 0f);
            dexSlot17x.Top.Set(250, 0f);
            pokedexTexture.Append(dexSlot17x);

            dexSlot18 = new DexSlot(18);
            dexSlot18.Top.Set(232, 0f);
            dexSlot18.Left.Set(504, 0f);
            pokedexTexture.Append(dexSlot18);

            dexSlot18x = new DexSlotHitbox(18);
            dexSlot18x.Left.Set(506, 0f);
            dexSlot18x.Top.Set(250, 0f);
            pokedexTexture.Append(dexSlot18x);

            DexInit();

            // == End Pokédex UI ==

            Append(TerramonMod.ZoomAnimator = new Animator());

            base.OnInitialize();
        }