Beispiel #1
0
        public void LoadContent(Resources res, SpriteFont font)
        {
            String userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Split(new List <char>()
            {
                '\\'
            }.ToArray(), 2)[1];
            //PLACEHOLDER
            //userName = "******"; //put in a thing that just rips this part away from the EMP/ part
            //PLACEHOLDER
            String saveDir = "C:/Users/" + userName + "/Documents/My Games/Afterhour/";

            this.saveDir = saveDir;

            if (Directory.Exists(saveDir))
            {
                this.saveFileCount = Directory.GetFiles(saveDir).Length;
                this.saveFilePaths = Directory.GetFiles(saveDir).ToList();
            }
            else
            {
                this.saveFileCount = 0;
            }

            getSaveData(saveDir);



            //Texture loading
            this.font     = font;
            this.frameTex = res.Menu_Continue_Frame;

            this.frameRect = new Rectangle((int)(Window.resolution.X / 2 - frameTex.Width / 2), (int)(Window.resolution.Y / 2 - frameTex.Height / 2), frameTex.Width, frameTex.Height);

            this.saveBarTex = res.Menu_Continue_SaveBar;

            this.playButtonTex   = res.Menu_Continue_FuncButton_Play;
            this.deleteButtonTex = res.Menu_Continue_FuncButton_Delete;

            //Post-Texture Loading

            for (int i = 0; i < saveFileCount; i++)
            {
                this.playButtons.Add(new ContFuncButton(ContFuncButton.PLAY, new Vector2(this.frameRect.X + 20, this.frameRect.Y + 105 + ((this.saveBarTex.Height + 5) * i))));
                this.deleteButtons.Add(new ContFuncButton(ContFuncButton.DELETE, new Vector2(this.frameRect.X + 40, this.frameRect.Y + 105 + ((this.saveBarTex.Height + 5) * i))));

                this.playButtons[i].LoadContent(playButtonTex);
                this.deleteButtons[i].LoadContent(deleteButtonTex);
            }

            backButton = new NextButton(new Vector2(15, 525), "Back");
            backButton.LoadContent(res);
        }
Beispiel #2
0
        public void LoadContent(Resources res, SpriteFont font)
        {
            this.creationFrameTex = res.Menu_CreationFrame;

            nameBox.LoadContent(res);


            List <Texture2D> genderIcons = new List <Texture2D>()
            {
                res.Icons_GenderIcons_Female, res.Icons_GenderIcons_Male
            };

            genderBoxes.LoadContent(genderIcons, res);

            hairstyleList.LoadContent(res);

            manaColorSlider.LoadContent(res);
            skinColorSlider.LoadContent(res);
            hairColorSlider.LoadContent(res);
            shirtColorSlider.LoadContent(res);

            charPrev.LoadContent(res, this.genderBoxes.curSelectedID, hairstyleList.curElementID, manaColorSlider.curColor, skinColorSlider.curColor, hairColorSlider.curColor, shirtColorSlider.curColor);

            nextButton1.LoadContent(res);
            backButton1.LoadContent(res);


            //Stats
            for (int i = 0; i < statCount; i++)
            {
                plusBoxes.Add(new ClickBox(new Vector2((creationFrameTex.Width - 40) / statCount * i + (Window.resolution.X - creationFrameTex.Width) / 2 + 40, statXOffset)));
                minusBoxes.Add(new ClickBox(new Vector2((creationFrameTex.Width - 40) / statCount * i + (Window.resolution.X - creationFrameTex.Width) / 2 + 40, statXOffset + 90)));

                plusBoxes[i].LoadContent(res.Menu_Stats_Plus);
                minusBoxes[i].LoadContent(res.Menu_Stats_Minus);

                statIcons.Add(new HoverBox(new Vector2((int)(((creationFrameTex.Width - 40) / statCount) * i + ((Window.resolution.X - creationFrameTex.Width) / 2) + 30), statXOffset + 35)));
            }

            this.hoverTex = res.Menu_Stats_HoverTextBackground;

            statIcons[0].LoadContent(res.Menu_Stats_ATK, "ATK: Attack, the stat \ndetailing raw, physical \npower.");
            statIcons[1].LoadContent(res.Menu_Stats_DEF, "DEF: Defense, the stat \ndetailing defense from both \nphysical and mana-based \nattacks.");
            statIcons[2].LoadContent(res.Menu_Stats_VIT, "VIT: Vitality, the stat detailing \nhealth and connection to the \nphysical self.");
            statIcons[3].LoadContent(res.Menu_Stats_DEX, "DEX: Dexterity, the stat \ndetailing speed and \nevasiveness.");
            statIcons[4].LoadContent(res.Menu_Stats_INT, "INT: Intelligence, the stat \ndetailing general knowledge \nand connection to the \nmental self.");
            statIcons[5].LoadContent(res.Menu_Stats_WIS, "WIS: Wisdom, the stat \ndetailing the connection \nbetween the self and outside \nworld.");
            statIcons[6].LoadContent(res.Menu_Stats_VIR, "VIR: Virtue, the stat detailing \nthe connection to \nsanctioned affinites.");
            statIcons[7].LoadContent(res.Menu_Stats_EVL, "EVL: Evil, the stat detailing \nthe connection to forbidden \naffinities.");

            for (int i = 0; i < statCount; i++)
            {
                statValues.Add(10);
            }


            nextButton2.LoadContent(res);
            backButton2.LoadContent(res);

            //

            this.font = font;
        }