private void DrawStaticStrings() { DrawTools.DrawCenteredShadowString(spriteBatch, StaticStringFont, "- A - SELECT - B - BACK", new Vector2(640, 620), StaticStringColor, 0.55f); //DrawTools.DrawCenteredShadowString(spriteBatch, StaticStringFont, "PROJECT MAGMA - MAY 19 RELEASE", // new Vector2(640, 115), StaticStringColor, 0.7f); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { base.Draw(gameTime, spriteBatch); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "CREDITS", new Vector2(620, 132), menu.StaticStringColor, 1.0f); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { for (int i = 0; i < MaxPlayers; i++) { bool active = playerActive[i]; Texture2D sprite = playerBackgroundInactive; float scale = 200f / sprite.Width; Vector2 pos = Position - new Vector2(210, 0) + new Vector2((i & 1) * 210, ((i & 2) >> 1) * (sprite.Height * scale + 10)); Color backgroundColor = Color.White; // load templates LevelData levelData = Game.Instance.ContentManager.Load <LevelData>("Level/Common/RobotTemplates"); EntityData entityData = levelData.entities[Game.Instance.Robots[robotSelected[i]].Entity]; List <AttributeData> attributes = entityData.CollectAttributes(levelData); List <PropertyData> properties = entityData.CollectProperties(levelData); // create a dummy entity Entity entity = new Entity(entityData.name); foreach (AttributeData attributeData in attributes) { entity.AddAttribute(attributeData.name, attributeData.template, attributeData.value); } Vector3 color1 = entity.GetVector3(CommonNames.Color1); Vector3 color2 = entity.GetVector3(CommonNames.Color2); if (active) { backgroundColor = new Color(color2 * 0.8f); } Vector2 halfSpriteDim = new Vector2(sprite.Width, sprite.Height) / 4; spriteBatch.Draw(sprite, pos - halfSpriteDim * (playerBoxSize.Value - 1f), null, backgroundColor, 0, Vector2.Zero, scale * playerBoxSize.Value, SpriteEffects.None, 0); if (active) { Texture2D robot = playerPreview[i]; float width = PlayerIconRect.Width * scale; float rscale = width / robot.Width; //spriteBatch.Draw(robot, pos + new Vector2(PlayerIconRect.Left, PlayerIconRect.Top) * scale, // null, Color.White, 0, Vector2.Zero, ((float)sprite.Width )/ robot.Width*scale, SpriteEffects.None, 0); spriteBatch.Draw(robot, pos, null, Color.White, 0, Vector2.Zero, ((float)sprite.Width) / robot.Width * scale, SpriteEffects.None, 0); } else { DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "HIT START", pos + halfSpriteDim - Vector2.UnitY * 27 * scale, menu.StaticStringColor, 1.2f * scale); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "TO JOIN", pos + halfSpriteDim + Vector2.UnitY * 27 * scale, menu.StaticStringColor, 1.2f * scale); } } }
private void DrawEffectString(SpriteBatch spriteBatch, string str, Vector2 pos, bool isSelected) { float scale = isSelected ? selectedSize.Value : unselectedSize.Value; // string should be centered lastBox = font.MeasureString(str) * scale; pos -= lastBox * 0.5f; // draw string contours DrawTools.DrawString(spriteBatch, font, str, pos + new Vector2(+contourOffset, +contourOffset), shadowColor, scale); DrawTools.DrawString(spriteBatch, font, str, pos + new Vector2(-contourOffset, +contourOffset), shadowColor, scale); DrawTools.DrawString(spriteBatch, font, str, pos + new Vector2(+contourOffset, -contourOffset), shadowColor, scale); DrawTools.DrawString(spriteBatch, font, str, pos + new Vector2(-contourOffset, -contourOffset), shadowColor, scale); DrawTools.DrawString(spriteBatch, font, str, pos + new Vector2(+contourOffset, +contourOffset) + DrawTools.ShadowOffset, DrawTools.ShadowColor, scale); DrawTools.DrawString(spriteBatch, font, str, pos, isSelected && Active ? Color.White : Color.LightGray, scale); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { base.Draw(gameTime, spriteBatch); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "CREDITS", new Vector2(620, 132), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "JANICK", new Vector2(350, 220), menu.StaticStringColor, 0.65f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "BERNET", new Vector2(350, 245), menu.StaticStringColor, 0.65f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "GAMEPLAY", new Vector2(350, 275), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "PROGRAMMING", new Vector2(350, 291), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "LEVEL", new Vector2(350, 316), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "DESIGN", new Vector2(350, 332), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "DOMINIK", new Vector2(930, 220), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "KAESER", new Vector2(930, 245), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "LEAD", new Vector2(930, 275), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "ARTIST", new Vector2(930, 291), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "GRAPHICS", new Vector2(930, 316), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "PROGRAMMING", new Vector2(930, 332), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "CHRISTIAN", new Vector2(640, 220), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "OBERHOLZER", new Vector2(640, 245), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "ENGINE", new Vector2(640, 275), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "PROGRAMMING", new Vector2(640, 291), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "SPECIAL", new Vector2(640, 316), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "EFFECTS", new Vector2(640, 332), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "PROGRAMMING", new Vector2(640, 348), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "JOYA", new Vector2(495, 420), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "CLARK", new Vector2(495, 445), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "3D", new Vector2(495, 480), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "MODELING", new Vector2(495, 496), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "TEXTURING", new Vector2(495, 521), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "AUSTIN", new Vector2(785, 420), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, "RODERIQUE", new Vector2(785, 445), menu.StaticStringColor, 0.7f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "CHARACTER", new Vector2(785, 480), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "MODELING", new Vector2(785, 496), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "CHARACTER", new Vector2(785, 521), menu.StaticStringColor, 1.0f); DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFontSmall, "ANIMATION", new Vector2(785, 537), menu.StaticStringColor, 1.0f); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { SpriteFont f = Game.Instance.ContentManager.Load <SpriteFont>("Fonts/menu_releasenotes"); DrawTools.DrawCenteredShadowString(spriteBatch, f, "RELEASE NOTES", new Vector2(620, 132), menu.StaticStringColor, 1.0f); string[] lines = funnyReleaseNotesLines; float offset = 0; for (int i = 0; i < lines.Length; ++i) { if (lines[i].StartsWith(" -")) { offset += 10; } DrawTools.DrawShadowString(spriteBatch, f, lines[i], new Vector2(220, 175 + offset), menu.StaticStringColor, 0.66f); offset += 30; } }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { DrawTools.DrawCenteredShadowString(spriteBatch, menu.StaticStringFont, string.Format("- A - NEXT PAGE - {0} - - B - BACK", PageNumber), new Vector2(640, 620), menu.StaticStringColor, 0.55f); }