Beispiel #1
0
        private void DrawCharStats(SpriteBatch sb)
        {
            Vector2 centPos = new Vector2(Window.resolution.X / 2 - font.MeasureString("Stats").X / 2 - 1, ((Window.resolution.Y / 2) - creationFrameTex.Height / 2) + 10);

            sb.DrawString(font, "Stats", centPos.ToPoint().ToVector2(), Color.White);

            centPos = new Vector2(Window.resolution.X / 2 - font.MeasureString("Remaining Points: " + remainingPoints.ToString()).X / 2 - 1, ((Window.resolution.Y / 2) - creationFrameTex.Height / 2) + 10);
            sb.DrawString(font, "Remaining Points: " + remainingPoints.ToString(), new Vector2((int)centPos.X, (int)centPos.Y + 50), Color.MediumVioletRed);


            for (int i = 0; i < statCount; i++)
            {
                plusBoxes[i].Draw(sb);
                minusBoxes[i].Draw(sb);

                statIcons[i].Draw(sb, this.font);
                sb.DrawString(this.font, statValues[i].ToString(), new Vector2((int)(((creationFrameTex.Width - 40) / statCount) * i + ((Window.resolution.X - creationFrameTex.Width) / 2) + 41), statXOffset - 28), Color.White);
            }

            foreach (HoverBox statIcon in statIcons)
            {
                if (statIcon.hovering)
                {
                    sb.Draw(hoverTex, new Rectangle(statIcon.bounds.X, statIcon.bounds.Y, hoverTex.Width, hoverTex.Height), Color.White);
                    sb.DrawString(font, statIcon.text, new Vector2((int)statIcon.bounds.X + 8, (int)statIcon.bounds.Y + 8), Color.White);
                }
            }


            nextButton2.Draw(sb);
            backButton2.Draw(sb);
        }
Beispiel #2
0
        public void Draw(SpriteBatch sb)
        {
            sb.Draw(this.frameTex, this.frameRect, Color.White);
            sb.DrawString(this.font, "Continue Save", new Vector2((int)(Window.resolution.X / 2 - font.MeasureString("Continue Save").X / 2), 30), Color.White);

            for (int i = 0; i < saveFileCount; i++)
            {
                sb.Draw(this.saveBarTex, new Rectangle(this.frameRect.X + 10, this.frameRect.Y + 10 + ((this.saveBarTex.Height + 5) * i), this.saveBarTex.Width, this.saveBarTex.Height), Color.White);
                sb.DrawString(this.font, saveNames[i] + "\nLevel " + saveLevels[i], new Vector2((int)(this.frameRect.X + 20), (int)(this.frameRect.Y + 20 + ((this.saveBarTex.Height + 5) * i))), Color.White);

                this.playButtons[i].Draw(sb);
                this.deleteButtons[i].Draw(sb);
            }

            backButton.Draw(sb);
        }
Beispiel #3
0
        private void DrawCharacterCreation(SpriteBatch sb)
        {
            Vector2 centPos = new Vector2(Window.resolution.X / 2 - font.MeasureString("Character Creation").X / 2 - 1, ((Window.resolution.Y / 2) - creationFrameTex.Height / 2) + 10);

            sb.DrawString(font, "Character Creation", new Vector2((int)centPos.X, (int)centPos.Y), Color.White);

            sb.DrawString(font, "Name", new Vector2(Window.resolution.X / 2 - font.MeasureString("Name").X / 2 - 4, Window.resolution.Y / 2 + 120), Color.White);
            nameBox.Draw(sb, new Vector2(Window.resolution.X / 2 - nameBox.bounds.Width / 2, Window.resolution.Y / 2 + 145), font);

            genderBoxes.Draw(sb);

            hairstyleList.Draw(sb);

            manaColorSlider.Draw(sb, font);
            skinColorSlider.Draw(sb, font);
            hairColorSlider.Draw(sb, font);
            shirtColorSlider.Draw(sb, font);

            charPrev.Draw(sb);

            nextButton1.Draw(sb);
            backButton1.Draw(sb);
        }