using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using RecrownedAthenaeum.ContentSystem; using RecrownedAthenaeum.UI.BookSystem; using RecrownedAthenaeum.UI.Modular.Modules; using RecrownedAthenaeum.UI.Modular.Modules.Interactive; using RecrownedAthenaeum.UI.SkinSystem; using RecrownedAthenaeum.UI.SkinSystem.Definitions; namespace RhythmBullet.Screens.MainMenu { internal class MainPage : Page { Image title; TextButton playButton; TextButton quitButton; internal MainPage() : base(0, 0) { } protected override void Initialize(ContentManagerController assets, ISkin skin) { title = new Image(assets.Get("title")); AddModule(title); SpriteFont font = assets.Get("gasalt_regular"); var test = skin.ObtainDefinition(typeof(TextButton)); playButton = new TextButton("Play!", font, skin); AddModule(playButton); quitButton = new TextButton("Quit", font, skin); AddModule(quitButton); } public override void ApplySize(int width, int height) { title.Scale = (width - 40) / title.Texture.Width; title.CenterOrigin(); title.bounds.X = width / 2; title.bounds.Y = height / 2; base.ApplySize(width, height); } public override void Draw(SpriteBatch batch) { base.Draw(batch); } } }