rhythmbullet/RhythmBullet/Screens/MainMenu/MainPage.cs

36 lines
1.1 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RecrownedAthenaeum.UI.Book;
using RecrownedAthenaeum.sdfoieroiesopeopweir.ContentSystem;
using RecrownedAthenaeum.sdfoieroiesopeopweir.UI.Modular.Modules;
using RecrownedAthenaeum.sdfoieroiesopeopweir.UI.Modular.Modules.Interactive;
namespace RecrownedAthenaeum.Screens.MainMenu
{
internal class MainPage : Page
{
Image title;
TextButton playButton;
TextButton quitButton;
internal MainPage(ContentManagerController assets) : base(0, 0)
{
title = new Image(assets.Get<Texture2D>("title"));
AddModule(title);
}
public override void ApplySize(int width, int height)
{
title.Scale = (width - 40) / title.Texture.Width;
title.bounds.X = (int)((width - title.bounds.Width) / 2f);
title.bounds.Y = (int)((height - title.bounds.Height) / 2f);
base.ApplySize(width, height);
}
public override void Draw(SpriteBatch batch)
{
base.Draw(batch);
}
}
}