rhythmbullet/RhythmBullet/Screens/MainMenu/MainPage.cs

36 lines
1.0 KiB
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RhythmBullet.UI.Book;
using RhythmBullet.Utilities.ContentSystem;
using RhythmBullet.Utilities.UI.Modular.Modules;
using RhythmBullet.Utilities.UI.Modular.Modules.Interactive;
namespace RhythmBullet.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);
}
}
}