using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.ModLoader; namespace CalamityMod.MainMenu { public class CalamityMainMenu : ModMenu { public override string DisplayName => "Calamity Style"; public override Asset Logo => ModContent.Request("CalamityMod/MainMenu/Logo"); public override Asset SunTexture => ModContent.Request("CalamityMod/Backgrounds/BlankPixel"); public override Asset MoonTexture => ModContent.Request("CalamityMod/Backgrounds/BlankPixel"); public override ModSurfaceBackgroundStyle MenuBackgroundStyle => ModContent.GetInstance(); // Before drawing the logo, draw the entire Calamity background. This way, the typical parallax background is skipped entirely. public override bool PreDrawLogo(SpriteBatch spriteBatch, ref Vector2 logoDrawCenter, ref float logoRotation, ref float logoScale, ref Color drawColor) { Texture2D texture = ModContent.Request("CalamityMod/MainMenu/MenuBackground").Value; spriteBatch.Draw(texture, new Vector2(0f, 0f), null, Color.White, 0f, Vector2.Zero, (float)Main.screenWidth / texture.Width, SpriteEffects.None, 0f); // TODO -- Draw plenty of cinders! return true; } } }