Beispiel #1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);
            ConfirmChangesButton.Draw(spriteBatch);
            var soundRec = new Rectangle(TopLeft.X + 406, TopLeft.Y + 44, 28, 28);
            var musicRec = new Rectangle(TopLeft.X + 406, TopLeft.Y + 110, 28, 28);

            if (newSettings.mutedSound)
            {
                spriteBatch.Draw(muted, soundRec, null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            }
            if (newSettings.mutedMusic)
            {
                spriteBatch.Draw(muted, musicRec, null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            }
            spriteBatch.DrawString(spriteFont, strings[0], new Vector2(TopLeft.X + 102, TopLeft.Y + 26), Color.Black, 0, TextMethods.CenterText(spriteFont, strings[0]), 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[1], new Vector2(TopLeft.X + 302, TopLeft.Y + 26), Color.Black, 0, TextMethods.CenterText(spriteFont, strings[1]), 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[2], new Vector2(TopLeft.X + 502, TopLeft.Y + 26), Color.Black, 0, TextMethods.CenterText(spriteFont, strings[2]), 1, SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, newSettings.horzRez + " x " + newSettings.vertRez, new Vector2(TopLeft.X + 28, TopLeft.Y + 54), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[3], new Vector2(TopLeft.X + 53, TopLeft.Y + 89), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[4], new Vector2(TopLeft.X + 53, TopLeft.Y + 130), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            var windowedRectangle = new Rectangle(TopLeft.X + 23, TopLeft.Y + 130, 24, 24);

            if (!newSettings.fullScreen)
            {
                spriteBatch.Draw(checkBoxActive, windowedRectangle, null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            }
            var fullscreenRec = new Rectangle(TopLeft.X + 23, TopLeft.Y + 89, 24, 24);

            if (newSettings.fullScreen)
            {
                spriteBatch.Draw(checkBoxActive, fullscreenRec, null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            }
            spriteBatch.Draw(checkBoxActive, new Rectangle(TopLeft.X + 212, TopLeft.Y + 48 + (41 * ((int)newSettings.textSpeed - 1)), 24, 24), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[5], new Vector2(TopLeft.X + 242, TopLeft.Y + 48), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[6], new Vector2(TopLeft.X + 242, TopLeft.Y + 89), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[7], new Vector2(TopLeft.X + 242, TopLeft.Y + 130), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);

            spriteBatch.Draw(dragSquare, new Rectangle(TopLeft.X + 452, TopLeft.Y + 48, (int)(newSettings.soundVolume * 100f), 20), null, Color.MistyRose, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            spriteBatch.Draw(dragSquare, new Rectangle(TopLeft.X + 452, TopLeft.Y + 114, (int)(newSettings.musVolume * 100f), 20), null, Color.MistyRose, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, newSettings.upKey.ToString(), new Vector2(TopLeft.X + 172, TopLeft.Y + 272), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.upKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.upKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.leftKey.ToString(), new Vector2(TopLeft.X + 172, TopLeft.Y + 314), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.leftKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.downKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.downKey.ToString(), new Vector2(TopLeft.X + 172, TopLeft.Y + 354), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.downKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.leftKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.rightKey.ToString(), new Vector2(TopLeft.X + 172, TopLeft.Y + 394), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.rightKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.rightKey.ToString(), 60), SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, strings[8], new Vector2(TopLeft.X + 38, TopLeft.Y + 262), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[9], new Vector2(TopLeft.X + 38, TopLeft.Y + 300), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[10], new Vector2(TopLeft.X + 38, TopLeft.Y + 344), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[11], new Vector2(TopLeft.X + 38, TopLeft.Y + 384), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, newSettings.mapKey.ToString(), new Vector2(TopLeft.X + 344, TopLeft.Y + 272), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.mapKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.mapKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.interactKey.ToString(), new Vector2(TopLeft.X + 344, TopLeft.Y + 314), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.interactKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.interactKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.runKey.ToString(), new Vector2(TopLeft.X + 344, TopLeft.Y + 354), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.runKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.runKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.pauseKey.ToString(), new Vector2(TopLeft.X + 344, TopLeft.Y + 394), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.pauseKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.pauseKey.ToString(), 60), SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, strings[12], new Vector2(TopLeft.X + 220, TopLeft.Y + 262), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[13], new Vector2(TopLeft.X + 220, TopLeft.Y + 300), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[14], new Vector2(TopLeft.X + 220, TopLeft.Y + 344), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[15], new Vector2(TopLeft.X + 220, TopLeft.Y + 384), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, newSettings.statusKey.ToString(), new Vector2(TopLeft.X + 520, TopLeft.Y + 272), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.statusKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.statusKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.spellKey.ToString(), new Vector2(TopLeft.X + 520, TopLeft.Y + 314), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.spellKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.spellKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.inventoryKey.ToString(), new Vector2(TopLeft.X + 520, TopLeft.Y + 354), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.inventoryKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.inventoryKey.ToString(), 60), SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, newSettings.sneakKey.ToString(), new Vector2(TopLeft.X + 520, TopLeft.Y + 394), Color.Black, 0, TextMethods.CenterText(spriteFont, newSettings.sneakKey.ToString()), TextMethods.ResizeText(spriteFont, newSettings.sneakKey.ToString(), 60), SpriteEffects.None, 0.18f);

            spriteBatch.DrawString(spriteFont, strings[16], new Vector2(TopLeft.X + 386, TopLeft.Y + 262), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[17], new Vector2(TopLeft.X + 386, TopLeft.Y + 300), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[18], new Vector2(TopLeft.X + 386, TopLeft.Y + 344), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            spriteBatch.DrawString(spriteFont, strings[20], new Vector2(TopLeft.X + 386, TopLeft.Y + 384), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);


            spriteBatch.DrawString(spriteFont, strings[19], new Vector2(TopLeft.X + 36, TopLeft.Y + 176), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);

            spriteBatch.Draw(checkBoxActive, new Rectangle(TopLeft.X + 36 + ((newSettings.combatSpeed * 62) - 62), TopLeft.Y + 203, 24, 24), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f);
            for (int i = 1; i < 5; i++)
            {
                spriteBatch.DrawString(spriteFont, i.ToString(), new Vector2(TopLeft.X + 63 + ((i * 62) - 62), TopLeft.Y + 203), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f);
            }

            if (reboundActive)
            {
                spriteBatch.Draw(inputActive, buttonRecs[activeKey], null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.17f);
            }
        }
Beispiel #2
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.DrawString(game.largeFont, playerCharacter.Name, new Vector2(TopLeft.X + 30, TopLeft.Y + 18), Color.Black, 0.0f, Vector2.Zero, TextMethods.ResizeText(game.largeFont, playerCharacter.Name, 258), SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.mediumFont, strings[0] + playerCharacter.Level.ToString(), new Vector2(TopLeft.X + 30, TopLeft.Y + 88), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.19f);
            if (playerCharacter.NextLevelExp != -1)
            {
                spriteBatch.DrawString(game.mediumFont, strings[1] + (playerCharacter.NextLevelExp - playerCharacter.Exp).ToString(), new Vector2(TopLeft.X + 30, TopLeft.Y + 118), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.19f);
                spriteBatch.DrawString(game.mediumFont, strings[2] + playerCharacter.TotalExp.ToString(), new Vector2(TopLeft.X + 30, TopLeft.Y + 148), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.19f);
            }
            else
            {
                spriteBatch.DrawString(game.mediumFont, strings[2] + playerCharacter.TotalExp.ToString(), new Vector2(TopLeft.X + 30, TopLeft.Y + 118), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.19f);
            }
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.HP.ToString() + " /" + playerCharacter.BattleStats.MaxHP.ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 28), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.HP.ToString() + "/" + playerCharacter.BattleStats.MaxHP.ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.SP.ToString() + " /" + playerCharacter.BattleStats.MaxSP.ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 56), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.SP.ToString() + "/" + playerCharacter.BattleStats.MaxSP.ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.Attributes[Attributes.Strength].ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 82), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.Attributes[Attributes.Strength].ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.Attributes[Attributes.Magic].ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 110), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.Attributes[Attributes.Magic].ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.Attributes[Attributes.Dexterity].ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 136), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.Attributes[Attributes.Dexterity].ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.Armour.ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 164), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.Armour.ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.smallFont, playerCharacter.BattleStats.Luck.ToString(), new Vector2(TopLeft.X + 494, TopLeft.Y + 190), Color.Black, 0.0f, TextMethods.CenterText(sfont, playerCharacter.BattleStats.Luck.ToString()), 1.0f, SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.mediumFont, strings[8] + game.party.QuestStats.DayCounter + ", " + getDayString(), new Vector2(TopLeft.X + 112, TopLeft.Y + 246), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, strings[8] + game.party.QuestStats.DayCounter + ", " + getDayString()), TextMethods.ResizeText(game.mediumFont, strings[8] + game.party.QuestStats.DayCounter + ", " + getDayString(), 120), SpriteEffects.None, 0.19f);
            spriteBatch.DrawString(game.mediumFont, playerParty.Gold.ToString(), new Vector2(TopLeft.X + 268, TopLeft.Y + 246), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, playerParty.Gold.ToString()), 1.0f, SpriteEffects.None, 0.19f);
            var drawVector = new Point(TopLeft.X + 373, TopLeft.Y + 109);

            spriteBatch.Draw(activeCharacterModel, new Rectangle((int)drawVector.X - (activeCharacterModel.Width / 2), (int)drawVector.Y - (activeCharacterModel.Height / 2), activeCharacterModel.Width, activeCharacterModel.Height), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.19f);
            spriteBatch.Draw(arcanas[(int)playerCharacter.Arcana], new Rectangle(TopLeft.X + 371, TopLeft.Y + 213, 62, 62), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.21f);
            base.Draw(spriteBatch);
        }
Beispiel #3
0
        public void Draw(SpriteBatch spriteBatch)
        {
            var baseOffset = new Point((game.GetScreenWidth() / 2) - (dialogueWindow.Width / 2), game.GetScreenHeight() - dialogueWindow.Height - 48);

            if (State != DiagStates.Null)
            {
                var drawText = Text.Substring(0, textPosition);
                for (int i = 0; i < drawText.Length; i++)
                {
                    if (drawText[i] == '|')
                    {
                        drawText = drawText.Remove(i, 1);
                    }
                }
                spriteBatch.DrawString(game.mediumFont, drawText, new Vector2(baseOffset.X + 20, baseOffset.Y + 20), Color.White);
                spriteBatch.Draw(dialogueWindow, new Rectangle(baseOffset.X, baseOffset.Y, 800, 156), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.12f);
                if (activeSpeaker != null)
                {
                    if (activeSpeaker.DisplayName != null)
                    {
                        if (usingBigNameWindow)
                        {
                            spriteBatch.DrawString(game.mediumFont, activeSpeaker.DisplayName, new Vector2(baseOffset.X + 184, baseOffset.Y - 16), Color.White, 0.0f, TextMethods.CenterText(game.mediumFont, activeSpeaker.DisplayName), TextMethods.ResizeText(game.mediumFont, activeSpeaker.DisplayName, 185), SpriteEffects.None, 0.10f);
                            spriteBatch.Draw(bigNameWindow, new Rectangle(baseOffset.X + 88, baseOffset.Y - 48, 200, 64), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.11f);
                        }
                        else
                        {
                            spriteBatch.DrawString(game.mediumFont, activeSpeaker.DisplayName, new Vector2(baseOffset.X + 128, baseOffset.Y - 16), Color.White, 0.0f, TextMethods.CenterText(game.mediumFont, activeSpeaker.DisplayName), 1.0f, SpriteEffects.None, 0.10f);
                            spriteBatch.Draw(nameWindow, new Rectangle(baseOffset.X + 48, baseOffset.Y - 48, 160, 64), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.11f);
                        }
                    }
                }
                if (this.State == DiagStates.Inactive)
                {
                    spriteBatch.Draw(nextIcon[nextDiagFrame], new Rectangle(baseOffset.X + 754, baseOffset.Y + 113, 28, 28), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.10f);
                }
            }
        }