public void Draw(SpriteBatch spriteBatch) { if (inMenu) { var drawPoint = new Point((game.GetScreenWidth() / 2) - (menuBackgroundBase.Width / 2), (game.GetScreenHeight() / 2) - (menuBackgroundBase.Height / 2)); var width = game.GetScreenWidth(); var height = game.GetScreenHeight(); spriteBatch.Draw(menuBackgroundBase, drawPoint.ToVector2(), null, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1); spriteBatch.Draw(TitleTexture, new Vector2((width / 2) - 300, (height / 100) * 8), null, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 0.54f); for (int i = 0; i < snowFlakes.Count; i++) { if (snowFlakes[i].X + 16 > 0) { spriteBatch.Draw(snowflake, new Vector2(snowFlakes[i].X, snowFlakes[i].Y), null, Color.FromNonPremultiplied(255, 255, 255, 125), 0, Vector2.Zero, 1, SpriteEffects.None, 0.55f); } } switch (state) { case (State.Main): { if (!game.inTransition) { for (int i = 0; i < Buttons.Length; i++) { Buttons[i].Draw(spriteBatch); spriteBatch.DrawString(game.mediumFont, strings[i], new Vector2(Buttons[i].Bounds.X + 80, Buttons[i].Bounds.Y + 32), Color.White, 0.0f, TextMethods.CenterText(game.mediumFont, strings[i]), 1.0f, SpriteEffects.None, 0.49f); } } break; } case (State.Load): { saveMenu.Draw(spriteBatch); break; } case (State.Options): { options.Draw(spriteBatch); break; } } } else { spriteBatch.Draw(game.debugSquare, new Rectangle(0, 0, game.GetScreenWidth(), game.GetScreenHeight()), null, Color.FromNonPremultiplied(0, 0, 0, (int)screenAlpha), 0, Vector2.Zero, SpriteEffects.None, 0); spriteBatch.Draw(IntroScreens[currentScreen], new Vector2(game.GetScreenWidth() / 2, game.GetScreenHeight() / 2), null, Color.White, 0, new Vector2(IntroScreens[currentScreen].Width / 2, IntroScreens[currentScreen].Height / 2), 1, SpriteEffects.None, 1); } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); spriteBatch.DrawString(game.mediumFont, strings[0], new Vector2(TopLeft.X + 120, TopLeft.Y + 43), Color.Black, 0, TextMethods.CenterText(game.mediumFont, strings[0]), 1, SpriteEffects.None, 0.09f); spriteBatch.DrawString(game.mediumFont, strings[1], new Vector2(TopLeft.X + 455, TopLeft.Y + 43), Color.Black, 0, TextMethods.CenterText(game.mediumFont, strings[1]), 1, SpriteEffects.None, 0.09f); var drawVector = new Point(TopLeft.X + 89, TopLeft.Y + 95); for (int i = 0; i < party.ActiveCharacters.Count; i++) { PlayerCharacter chara = party.GetPlayerCharacter(party.ActiveCharacters[i]); spriteBatch.Draw(chara.uiPortrait, new Rectangle(drawVector.X, drawVector.Y, 62, 62), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.09f); drawVector.Y += 83; } drawVector = new Point(TopLeft.X + 374, TopLeft.Y + 95); for (int i = 0; i < party.InactiveCharacters.Count; i++) { PlayerCharacter chara = party.GetPlayerCharacter(party.InactiveCharacters[i]); spriteBatch.Draw(chara.uiPortrait, new Rectangle(drawVector.X, drawVector.Y, 62, 62), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.09f); drawVector.Y += 83; if (i == 2) { drawVector = new Point(TopLeft.X + 476, TopLeft.Y + 95); } } }
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); }
public override void Draw(SpriteBatch spriteBatch) { if (!castingSpell) { if (nameWindow != null) { nameWindow.Draw(spriteBatch); } base.Draw(spriteBatch); for (int i = 0; i < spells.Length; i++) { spells[i].Draw(spriteBatch); spriteBatch.DrawString(smallFont, pc.Spells[i].DisplayName, new Vector2(spells[i].Bounds.X, spells[i].Bounds.Y - 16), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.14f); spriteBatch.DrawString(smallFont, TextMethods.WrapText(smallFont, pc.Spells[i].Description, 182), new Vector2(spells[i].Bounds.X + 68, spells[i].Bounds.Y + 16), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.14f); spriteBatch.DrawString(smallFont, "SP Cost: " + pc.Spells[i].ManaCost(pc).ToString(), new Vector2(spells[i].Bounds.X + 192, spells[i].Bounds.Y + 64), Color.Blue, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.14f); } } else { var drawVector = new Vector2(game.GetScreenWidth() / 2, 96); spriteBatch.Draw(castSpellTextBack, new Rectangle((int)drawVector.X, (int)drawVector.Y, 400, 64), null, Color.White, 0, new Vector2(200, 32), SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, castWorldSpellText, drawVector, Color.White, 0, TextMethods.CenterText(game.mediumFont, castWorldSpellText), 1, SpriteEffects.None, 0.00f); } }
public override void Draw(SpriteBatch spriteBatch) { NextButton.Draw(spriteBatch); PreviousButton.Draw(spriteBatch); var drawVect = new Vector2(TopLeft.X + 80, TopLeft.Y + 56); for (int i = 0; i < 5; i++) { spriteBatch.DrawString(game.mediumFont, days[i], drawVect, Color.Black, 0, TextMethods.CenterText(game.mediumFont, days[i]), 1, SpriteEffects.None, 0.16f); drawVect.X = drawVect.X + 109; } drawVect = new Vector2(TopLeft.X + 30, TopLeft.Y + 79); for (int i = (viewedMonth * 15) + 1; i < (viewedMonth * 15) + 16; i++) { spriteBatch.DrawString(game.mediumFont, i - (15 * viewedMonth) + ".", new Vector2(drawVect.X + 2, drawVect.Y + 2), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.16f); if (game.party.QuestStats.DayCounter == i) { spriteBatch.Draw(dayRimShine, new Rectangle((int)drawVect.X, (int)drawVect.Y, 107, 102), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.17f); } if (game.calendarEvents.ContainsKey(i)) { if (game.calendarEvents[i].NoClass) { spriteBatch.DrawString(game.smallFont, strings[7], new Vector2(drawVect.X + 2, drawVect.Y + 21), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.16f); } if (game.calendarEvents[i].Exam) { spriteBatch.DrawString(game.smallFont, strings[6], new Vector2(drawVect.X + 2, drawVect.Y + 21), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.16f); } if (game.calendarEvents[i].Classes != null) { var classes = "~"; if (game.calendarEvents[i].Classes.Length == 1) { classes = classes + strings[game.calendarEvents[i].Classes[0]] + "~"; } else { classes = classes + strings[game.calendarEvents[i].Classes[0]] + "/" + strings[game.calendarEvents[i].Classes[1]] + "~"; } spriteBatch.DrawString(game.smallFont, classes, new Vector2(drawVect.X + 2, drawVect.Y + 21), Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.16f); } if (game.calendarEvents[i].ExpiredQuests != null) { var ExpQuestVector = new Point((int)drawVect.X + 2, (int)drawVect.Y + 70); var rect = new Rectangle(ExpQuestVector.X, ExpQuestVector.Y, 28, 28); for (int e = 0; e < game.calendarEvents[i].ExpiredQuests.Length; e++) { var quest = game.party.QuestStats.Quests.Find(q => q.questID == game.calendarEvents[i].ExpiredQuests[e]); if (quest != null) { if (rect.X < drawVect.X + 108) { if (quest.mainQuest) { spriteBatch.Draw(MainQuestWarningIcon, rect, null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.16f); } else { spriteBatch.Draw(SideQuestWarningIcon, rect, null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.16f); } if (Input.IsMouseOver(rect)) { DrawMethods.DrawToolTip(spriteBatch, game.Input.oldMouseState.Position.ToVector2(), game.smallFont, tooltip, strings[8] + '"' + quest.Title + '"'); } rect.X += 28; } } } } } //this goes at the end of the loop to set the next line drawVect.X += 108; if (i - (15 * viewedMonth) == 5) { drawVect = new Vector2(TopLeft.X + 30, TopLeft.Y + 184); continue; } if (i - (15 * viewedMonth) == 10) { drawVect = new Vector2(TopLeft.X + 30, TopLeft.Y + 289); } } drawVect = new Vector2(TopLeft.X + 146, TopLeft.Y + 428); var month = GetMonthStringIndex(viewedMonth); spriteBatch.DrawString(game.mediumFont, months[month], drawVect, Color.Black, 0, TextMethods.CenterText(game.mediumFont, months[month]), 1, SpriteEffects.None, 0.16f); base.Draw(spriteBatch); }
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); } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); var drawVector = new Point(game.GetScreenWidth() / 2 - 350, game.GetScreenHeight() / 2 - 295); if (displayTutHighlight) { spriteBatch.Draw(tutHighlight, new Rectangle(drawVector.X + 7, drawVector.Y + 533, 63, 52), null, new Color(255, 255, 255, highlightAlpha), 0, Vector2.Zero, SpriteEffects.FlipHorizontally, 0f); } BackButton.Draw(spriteBatch); if (Input.IsMouseOver(helpRectangle)) { DrawMethods.DrawToolTip(spriteBatch, new Vector2(game.Input.oldMouseState.X, game.Input.oldMouseState.Y), game.smallFont, tooltipWindow, strings[16 + (int)stage]); displayTutHighlight = false; } if (!canAdvanceToNextStage()) { spriteBatch.Draw(greyedOut, new Rectangle(drawVector.X + 632, drawVector.Y + 533, 61, 50), Color.White); } else { NextButton.Draw(spriteBatch); } switch (stage) { case (Stage.Naming): { spriteBatch.DrawString(game.mediumFont, strings[0], new Vector2(drawVector.X + 350, drawVector.Y + 32), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, strings[0]), 1.0f, SpriteEffects.None, 0.0f); drawVector.X += 125; drawVector.Y += 132; spriteBatch.Draw(nameBar, new Rectangle(drawVector.X, drawVector.Y, 500, 68), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.001f); drawVector.X += 6; drawVector.Y += 6; spriteBatch.DrawString(game.largeFont, playerName, drawVector.ToVector2(), Color.Black, 0.0f, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.0f); if (displayCursor && nameInputActive) { spriteBatch.DrawString(game.largeFont, "|", new Vector2(drawVector.X + game.largeFont.MeasureString(playerName.Substring(0, cursorPosition)).X - 12, drawVector.Y), Color.Black, 0.0f, new Vector2(0, 0), 1.0f, SpriteEffects.None, 0.0f); } spriteBatch.Draw(genderCircle, new Rectangle(baseOffset.X + 160, baseOffset.Y + 282, 70, 70), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.001f); spriteBatch.Draw(maleIcon, new Rectangle(baseOffset.X + 172, baseOffset.Y + 296, 44, 44), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0f); spriteBatch.Draw(genderCircle, new Rectangle(baseOffset.X + 460, baseOffset.Y + 282, 70, 70), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.001f); spriteBatch.Draw(femaleIcon, new Rectangle(baseOffset.X + 474, baseOffset.Y + 296, 44, 44), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0f); if (gender == Gender.Male) { spriteBatch.Draw(genderHighlight, new Rectangle(baseOffset.X + 160, baseOffset.Y + 282, 70, 70), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0f); } if (gender == Gender.Female) { spriteBatch.Draw(genderHighlight, new Rectangle(baseOffset.X + 460, baseOffset.Y + 282, 70, 70), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.0f); } break; } case (Stage.Arcana): { spriteBatch.DrawString(game.mediumFont, strings[1], new Vector2(drawVector.X + 350, drawVector.Y + 32), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, strings[1]), 1.0f, SpriteEffects.None, 0.0f); drawVector = new Point(game.GetScreenWidth() / 2 - 200, game.GetScreenHeight() / 2 - 180); spriteBatch.Draw(ArcanaWheel, new Rectangle(drawVector.X, drawVector.Y, 400, 400), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.02f); for (int i = 0; i < arcanaRecs.Length; i++) { if (game.Input.IsMouseOver(arcanaRecs[i])) { DrawMethods.DrawToolTip(spriteBatch, new Vector2(game.Input.oldMouseState.X, game.Input.oldMouseState.Y), game.smallFont, tooltipWindow, strings[4 + i]); break; } } if (selectedArcana != Arcana.Null) { spriteBatch.Draw(arcanaHighlight, arcanaRecs[(int)selectedArcana], null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.01f); } break; } case (Stage.Attributes): { spriteBatch.DrawString(game.mediumFont, strings[2], new Vector2(drawVector.X + 300, drawVector.Y + 32), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, strings[2]), 1.0f, SpriteEffects.None, 0.0f); drawVector = new Point(game.GetScreenWidth() / 2 - 240, game.GetScreenHeight() / 2 - 230); spriteBatch.Draw(attributesWindow, new Rectangle(drawVector.X, drawVector.Y, 508, 426), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.02f); spriteBatch.DrawString(game.mediumFont, Health.ToString(), new Vector2(drawVector.X + 94, drawVector.Y + 339), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, Health.ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, Mana.ToString(), new Vector2(drawVector.X + 198, drawVector.Y + 339), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, Mana.ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, charAttributes[Attributes.Strength].ToString(), new Vector2(drawVector.X + 124, drawVector.Y + 99), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, charAttributes[Attributes.Strength].ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, charAttributes[Attributes.Magic].ToString(), new Vector2(drawVector.X + 124, drawVector.Y + 181), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, charAttributes[Attributes.Magic].ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, charAttributes[Attributes.Dexterity].ToString(), new Vector2(drawVector.X + 124, drawVector.Y + 262), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, charAttributes[Attributes.Dexterity].ToString()), 1.0f, SpriteEffects.None, 0.01f); var recs = new Rectangle[5]; recs[0] = new Rectangle(drawVector.X + 15, drawVector.Y + 66, 204, 70); recs[1] = new Rectangle(drawVector.X + 15, drawVector.Y + 147, 204, 70); recs[2] = new Rectangle(drawVector.X + 15, drawVector.Y + 228, 204, 70); recs[3] = new Rectangle(drawVector.X + 13, drawVector.Y + 305, 101, 63); recs[4] = new Rectangle(drawVector.X + 118, drawVector.Y + 305, 101, 63); for (int i = 0; i < recs.Length; i++) { if (game.Input.IsMouseOver(recs[i])) { attributeDesc = strings[10 + i]; goto DrawRemainingPoints; } } if (pointsToAllocate > 0) { for (int i = 0; i < AttributeButtons.Length; i++) { AttributeButtons[i].Draw(spriteBatch); } } attributeDesc = strings[15]; DrawRemainingPoints: spriteBatch.DrawString(game.mediumFont, TextMethods.WrapText(game.mediumFont, attributeDesc, 214), new Vector2(drawVector.X + 263, drawVector.Y + 75), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.01f); drawVector = new Point(game.GetScreenWidth() / 2 - 350, game.GetScreenHeight() / 2 - 295); drawVector.X += 73; drawVector.Y += 548; spriteBatch.Draw(pointsRemainingBox, new Rectangle(drawVector.X, drawVector.Y, 210, 36), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.02f); drawVector.X += 4; drawVector.Y += 8; spriteBatch.DrawString(game.mediumFont, strings[16] + pointsToAllocate, drawVector.ToVector2(), Color.Black, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 0.01f); break; } case (Stage.Finish): { spriteBatch.DrawString(game.mediumFont, strings[3], new Vector2(drawVector.X + 300, drawVector.Y + 32), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, strings[3]), 1.0f, SpriteEffects.None, 0.0f); drawVector = new Point(game.GetScreenWidth() / 2 - 240, game.GetScreenHeight() / 2 - 230); spriteBatch.Draw(FinishPanel, new Rectangle(drawVector.X, drawVector.Y, 508, 426), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.02f); spriteBatch.DrawString(game.largeFont, playerName, new Vector2(drawVector.X + 18, drawVector.Y + 8), Color.Black, 0.0f, Vector2.Zero, 1, SpriteEffects.None, 0.01f); if (gender == Gender.Male) { spriteBatch.Draw(maleIcon, new Rectangle(drawVector.X + 54, drawVector.Y + 244, 44, 44), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.0f); } if (gender == Gender.Female) { spriteBatch.Draw(femaleIcon, new Rectangle(drawVector.X + 54, drawVector.Y + 244, 44, 44), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.0f); } spriteBatch.DrawString(game.mediumFont, Health + "/" + Health, new Vector2(drawVector.X + 256, drawVector.Y + 113), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, Health + "/" + Health), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, Mana + "/" + Mana, new Vector2(drawVector.X + 256, drawVector.Y + 171), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, Mana + "/" + Mana), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, charAttributes[Attributes.Strength].ToString(), new Vector2(drawVector.X + 256, drawVector.Y + 229), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, charAttributes[Attributes.Strength].ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, charAttributes[Attributes.Magic].ToString(), new Vector2(drawVector.X + 256, drawVector.Y + 287), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, charAttributes[Attributes.Magic].ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.DrawString(game.mediumFont, charAttributes[Attributes.Dexterity].ToString(), new Vector2(drawVector.X + 256, drawVector.Y + 345), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, charAttributes[Attributes.Dexterity].ToString()), 1.0f, SpriteEffects.None, 0.01f); spriteBatch.Draw(arcanas[(int)selectedArcana], new Rectangle(drawVector.X + 15, drawVector.Y + 94, 120, 120), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.01f); drawVector = new Point(game.GetScreenWidth() / 2 - 350, game.GetScreenHeight() / 2 - 295); spriteBatch.Draw(finishTick, new Rectangle(drawVector.X + 632, drawVector.Y + 533, 61, 50), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.029f); break; } } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); var drawVector = new Vector2(TopLeft.X, TopLeft.Y); for (int i = 0; i < CharacterButtons.Length; i++) { CharacterButtons[i].Draw(spriteBatch); } spriteBatch.Draw(activeCharacterHighlight, new Rectangle((int)drawVector.X + 32 + (65 * activeCharacterIndex), (int)drawVector.Y + 29, 62, 62), null, Color.NavajoWhite, 0, Vector2.Zero, SpriteEffects.None, 0.01f); if (activePane == ActivePane.BuyPane) { drawVector = new Vector2(TopLeft.X + 85, TopLeft.Y + 122); spriteBatch.DrawString(game.mediumFont, strings[0], drawVector, Color.RosyBrown, 0.0f, TextMethods.CenterText(game.mediumFont, "BUY"), 1.0f, SpriteEffects.None, 0.1f); drawVector = new Vector2(TopLeft.X + 234, TopLeft.Y + 122); spriteBatch.DrawString(game.mediumFont, strings[1], drawVector, Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, "SELL"), 1.0f, SpriteEffects.None, 0.1f); } else { drawVector = new Vector2(TopLeft.X + 85, TopLeft.Y + 122); spriteBatch.DrawString(game.mediumFont, strings[0], drawVector, Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, "BUY"), 1.0f, SpriteEffects.None, 0.1f); drawVector = new Vector2(TopLeft.X + 234, TopLeft.Y + 122); spriteBatch.DrawString(game.mediumFont, strings[1], drawVector, Color.RosyBrown, 0.0f, TextMethods.CenterText(game.mediumFont, "SELL"), 1.0f, SpriteEffects.None, 0.1f); } drawVector = new Vector2(TopLeft.X + 30, TopLeft.Y + 166); for (int i = 0; i < activeItems.Count; i++) { var drawRectangle = new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64); if (activeItems[i].Value * buyValue > playerParty.Gold && activePane == ActivePane.BuyPane) { spriteBatch.Draw(activeItems[i].Icon, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), null, Color.Gray, 0.0f, Vector2.Zero, SpriteEffects.None, 0.1f); } else { spriteBatch.Draw(activeItems[i].Icon, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.1f); } if (game.Input.IsMouseOver(drawRectangle)) { spriteBatch.Draw(highlight, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), Color.White); spriteBatch.DrawString(game.mediumFont, activeItems[i].DisplayName, new Vector2(TopLeft.X + 541, TopLeft.Y + 169), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, activeItems[i].DisplayName), 1.0f, SpriteEffects.None, 0.1f); spriteBatch.Draw(activeItems[i].Icon, new Rectangle(TopLeft.X + 541, TopLeft.Y + 212, 64, 64), null, Color.White, 0.0f, new Vector2(activeItems[i].Icon.Width / 2, activeItems[i].Icon.Height / 2), SpriteEffects.None, 0.1f); spriteBatch.DrawString(game.smallFont, activeItems[i].Description, new Vector2(TopLeft.X + 541, TopLeft.Y + 310), Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, activeItems[i].Description), 1.0f, SpriteEffects.None, 0.1f); if (activeItems[i] is EquippableItem) { var equip = (EquippableItem)activeItems[i]; for (int e = 0; e < equip.equipEffects.Count; e++) { spriteBatch.DrawString(game.smallFont, equip.equipEffects[e].Description(), new Vector2(TopLeft.X + 541, TopLeft.Y + 390 + (12 * e)), Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, equip.equipEffects[e].Description()), 1.0f, SpriteEffects.None, 0.17f); } } if (activeItems[i] is ConsumableItem) { var consum = (ConsumableItem)activeItems[i]; if (consum.BattleAction != null) { for (int e = 0; e < consum.BattleAction.actionEffects.Count; e++) { spriteBatch.DrawString(game.smallFont, consum.BattleAction.ReturnInventoryDescription(e), new Vector2(TopLeft.X + 541, TopLeft.Y + 390 + (12 * e)), Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, consum.BattleAction.ReturnInventoryDescription(e)), 1.0f, SpriteEffects.None, 0.17f); } } } } drawVector.X += 32; drawVector.Y += 73; spriteBatch.DrawString(game.smallFont, Math.Round((activeItems[i].Value * itemValueDisplay)).ToString(), drawVector, Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, Math.Round((activeItems[i].Value * itemValueDisplay)).ToString()), 1.0f, SpriteEffects.None, 0.1f); drawVector.X -= 32; drawVector.Y -= 73; drawVector.X += 88; if (i == 3) { drawVector.X = TopLeft.X + 30; drawVector.Y = TopLeft.Y + 268; } if (i == 7) { drawVector.X = TopLeft.X + 30; drawVector.Y = TopLeft.Y + 370; } if (i == 11) { drawVector.X = TopLeft.X + 30; drawVector.Y = TopLeft.Y + 472; } } spriteBatch.DrawString(game.mediumFont, playerParty.Gold.ToString(), new Vector2(TopLeft.X + 589, TopLeft.Y + 566), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, playerParty.Gold.ToString()), 1.0f, SpriteEffects.None, 0.1f); }
public void Draw(SpriteBatch spriteBatch) { if (charaSelector != null) charaSelector.Draw(spriteBatch); if (display) { map = (Map)game.Scene; int drawX = 0; int drawY = 0; spriteBatch.Draw(UIUpperLeft, new Rectangle(drawX, drawY, 200, 200), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.1f); if (!game.gameFlags["bNight"]) spriteBatch.Draw(timeOfDayIcons[0], new Rectangle(drawX, drawY, 70, 70), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.09f); else { spriteBatch.Draw(timeOfDayIcons[1], new Rectangle(drawX, drawY, 70, 70), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.09f); } for (int i = 0; i < Buttons.Length; i++) Buttons[i].Draw(spriteBatch); drawX = game.GetScreenWidth() - 70; drawY = 48; spriteBatch.Draw(UIRight, new Rectangle(drawX, drawY, 70, 460), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.1f); if (!game.gameFlags["bAccessPartyWindow"]) spriteBatch.Draw(UIGreyCircle, new Rectangle(drawX + 4, drawY + 294, 62, 62), null, Color.White, 0f, Vector2.Zero, SpriteEffects.None, 0.05f); drawX = 0; drawY = game.GetScreenHeight() - 100; if (map.DisplayName != null) { spriteBatch.Draw(UIBottomLeft, new Rectangle(drawX, drawY, 212, 100), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.12f); spriteBatch.DrawString(spriteFont, "~" + map.DisplayName + "~", new Vector2(drawX + 103, drawY + 74), Color.White, 0.0f, TextMethods.CenterText(spriteFont, "~" + map.DisplayName + "~"), 1, SpriteEffects.None, 0.11f); } } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); var drawVector = new Vector2(TopLeft.X + 23, TopLeft.Y + 64); for (int i = 0; i < pc.Equips.Length; i++) { if (pc.Equips[i] != null) { spriteBatch.Draw(pc.Equips[i].Icon, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.17f); } drawVector.X += 67; } drawVector = new Vector2(TopLeft.X + 23, TopLeft.Y + 153); var firstEquips = new List <Item>(); for (int i = 0; i < pc.Inventory.Count; i++) { var drawRectangle = new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64); spriteBatch.Draw(pc.Inventory[i].Icon, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.17f); if ((pc.Inventory[i] is EquippableItem)) { if (pc.Equips.Contains((EquippableItem)pc.Inventory[i]) && !firstEquips.Contains(pc.Inventory[i])) { spriteBatch.Draw(equipIcon, new Rectangle((int)drawVector.X + 4, (int)drawVector.Y + 4, 16, 16), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.14f); firstEquips.Add(pc.Inventory[i]); } } if (game.Input.IsMouseOver(drawRectangle)) { if (drawHighlight) { spriteBatch.Draw(highlight, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), Color.White); } if (draggedItemIndex == -1 && droppedItemIndex == -1 && displayNameWindow == false) { spriteBatch.DrawString(game.mediumFont, TextMethods.WrapText(game.mediumFont, pc.Inventory[i].DisplayName, 400), new Vector2(TopLeft.X + 458, TopLeft.Y + 23), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, TextMethods.WrapText(game.mediumFont, pc.Inventory[i].DisplayName, 400)), 1.0f, SpriteEffects.None, 0.17f); spriteBatch.Draw(pc.Inventory[i].Icon, new Rectangle(TopLeft.X + 458, TopLeft.Y + 100, 64, 64), null, Color.White, 0.0f, new Vector2(pc.Inventory[i].Icon.Width / 2, pc.Inventory[i].Icon.Height / 2), SpriteEffects.None, 0.17f); spriteBatch.DrawString(game.smallFont, pc.Inventory[i].Description, new Vector2(TopLeft.X + 458, TopLeft.Y + 164), Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, pc.Inventory[i].Description), 1.0f, SpriteEffects.None, 0.17f); if (pc.Inventory[i] is EquippableItem) { var equip = (EquippableItem)pc.Inventory[i]; for (int e = 0; e < equip.equipEffects.Count; e++) { spriteBatch.DrawString(game.smallFont, equip.equipEffects[e].Description(), new Vector2(TopLeft.X + 458, TopLeft.Y + 252 + (12 * e)), Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, equip.equipEffects[e].Description()), 1.0f, SpriteEffects.None, 0.17f); } } if (pc.Inventory[i] is ConsumableItem) { var consum = (ConsumableItem)pc.Inventory[i]; if (consum.BattleAction != null) { for (int e = 0; e < consum.BattleAction.actionEffects.Count; e++) { spriteBatch.DrawString(game.smallFont, consum.BattleAction.ReturnInventoryDescription(e), new Vector2(TopLeft.X + 458, TopLeft.Y + 252 + (12 * e)), Color.Black, 0.0f, TextMethods.CenterText(game.smallFont, consum.BattleAction.ReturnInventoryDescription(e)), 1.0f, SpriteEffects.None, 0.17f); } } } } } drawVector.X += 67; if (i == 3) { drawVector.X = TopLeft.X + 23; drawVector.Y = TopLeft.Y + 220; } if (i == 7) { drawVector.X = TopLeft.X + 23; drawVector.Y = TopLeft.Y + 287; } if (i == 11) { drawVector.X = TopLeft.X + 23; drawVector.Y = TopLeft.Y + 354; } } if (dragAndDropActive && !confirmDropItem) { spriteBatch.Draw(pc.Inventory[draggedItemIndex].Icon, new Rectangle(game.Input.oldMouseState.X, game.Input.oldMouseState.Y, 64, 64), null, Color.FromNonPremultiplied(225, 225, 225, 135), 0.0f, new Vector2(32, 32), SpriteEffects.None, 0.0f); } if (confirmDropItem) { spriteBatch.Draw(confirmWindow, new Rectangle(game.GetScreenWidth() / 2, game.GetScreenHeight() / 2, 384, 192), null, Color.White, 0.0f, new Vector2(192, 69), SpriteEffects.None, 0.02f); spriteBatch.DrawString(game.mediumFont, strings[0], new Vector2(game.GetScreenWidth() / 2, game.GetScreenHeight() / 2), Color.Black, 0.0f, TextMethods.CenterText(game.mediumFont, strings[0]), 1.0f, SpriteEffects.None, 0.01f); ConfirmButtons[0].Draw(spriteBatch); ConfirmButtons[1].Draw(spriteBatch); } if (displayNameWindow) { NameWindow.Draw(spriteBatch); } if (inBattle) { spriteBatch.Draw(greyedOut, new Rectangle(TopLeft.X + 348, TopLeft.Y + 413, 86, 50), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.01f); spriteBatch.Draw(greyedOut, new Rectangle(TopLeft.X + 440, TopLeft.Y + 413, 86, 50), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.01f); } if (inBattle) { if (party.ActiveCharacters.Count == 1) { spriteBatch.Draw(greyedOut, new Rectangle(TopLeft.X + 348, TopLeft.Y + 413, 86, 50), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.01f); } } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); var drawVector = new Vector2(TopLeft.X + 40, TopLeft.Y + 40); for (int i = 0; i < learnableSpells.Count; i++) { if (i == 5 || i == 10 || i == 15 || i == 20) { drawVector.X = TopLeft.X + 40 + ((i / 5) * 63); drawVector.Y = TopLeft.Y + 40; } spriteBatch.Draw(learnableSpells[i].SpellIcon, new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 64), null, Color.White, 0, Vector2.Zero, SpriteEffects.None, 0.18f); if (spellBook == null) { if (game.Input.IsMouseOver(new Rectangle((int)drawVector.X, (int)drawVector.Y, 64, 63))) { var vec = new Vector2(TopLeft.X + 483, TopLeft.Y + 40); spriteBatch.DrawString(game.mediumFont, learnableSpells[i].DisplayName, vec, Color.Black, 0, TextMethods.CenterText(game.mediumFont, learnableSpells[i].DisplayName), 1, SpriteEffects.None, 0.18f); vec = new Vector2(TopLeft.X + 483, TopLeft.Y + 90); spriteBatch.Draw(learnableSpells[i].SpellIcon, new Rectangle((int)vec.X, (int)vec.Y, 64, 64), null, Color.White, 0, new Vector2(32, 32), SpriteEffects.None, 0.18f); vec = new Vector2(TopLeft.X + 380, TopLeft.Y + 128); spriteBatch.DrawString(game.smallFont, TextMethods.WrapText(game.smallFont, learnableSpells[i].Description, 200), vec, Color.Black, 0, Vector2.Zero, 1, SpriteEffects.None, 0.18f); vec = new Vector2(TopLeft.X + 380, TopLeft.Y + 380); if (pc.Level >= learnableSpells[i].ReturnRequiredLevel(pc.Arcana)) { spriteBatch.DrawString(game.smallFont, TextMethods.WrapText(game.smallFont, strings[0] + MathHelper.Clamp(learnableSpells[i].ReturnRequiredLevel(pc.Arcana), 1, 50).ToString(), 200), vec, Color.Black, 0.0f, Vector2.Zero, 1, SpriteEffects.None, 0.18f); } else { spriteBatch.DrawString(game.smallFont, TextMethods.WrapText(game.smallFont, strings[0] + MathHelper.Clamp(learnableSpells[i].ReturnRequiredLevel(pc.Arcana), 1, 50).ToString(), 200), vec, Color.Red, 0.0f, Vector2.Zero, 1, SpriteEffects.None, 0.18f); } } } drawVector.Y += 63; } if (confirmOverwriteLearnedSpell) { spriteBatch.Draw(confirmWindow, new Rectangle(game.GetScreenWidth() / 2, game.GetScreenHeight() / 2, 384, 192), null, Color.White, 0.0f, new Vector2(192, 69), SpriteEffects.None, 0.15f); spriteBatch.DrawString(game.mediumFont, TextMethods.WrapText(game.mediumFont, strings[1], 350), new Vector2(game.GetScreenWidth() / 2, game.GetScreenHeight() / 2), Color.White, 0.0f, TextMethods.CenterText(game.mediumFont, TextMethods.WrapText(game.mediumFont, strings[1], 350)), 1.0f, SpriteEffects.None, 0.13f); } if (learnedSpell != null) { drawVector = new Vector2(TopLeft.X + 103, TopLeft.Y + 390); spriteBatch.Draw(learnedSpell.SpellIcon, new Rectangle((int)drawVector.X, (int)drawVector.Y, 56, 56), new Rectangle(4, 4, 56, 56), Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f); drawVector = new Vector2(TopLeft.X + 163, TopLeft.Y + 390); spriteBatch.Draw(progressBar, new Rectangle((int)drawVector.X, (int)drawVector.Y, 9, (questStats.learnSpellProgress * 56) / 100), null, Color.White, 0.0f, Vector2.Zero, SpriteEffects.None, 0.18f); } if (spellBook != null) { spellBook.Draw(spriteBatch); } }
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); } } }