rhythmbullet/RhythmBullet/Zer01HD/Screens/MainMenu/MainPage.cs

32 lines
961 B
C#

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RhythmBullet.Zer01HD.UI.Book;
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
using RhythmBullet.Zer01HD.Utilities.UI.Modular.Modules;
namespace RhythmBullet.Zer01HD.Screens.MainMenu
{
internal class MainPage : Page
{
Image title;
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);
}
}
}