rhythmbullet/RhythmBullet/Zer01HD/Game/Screens/MainMenu/MainPage.cs
2018-11-15 01:22:35 -06:00

32 lines
955 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.Game.Screens.MainMenu
{
internal class MainPage : Page
{
Image title;
internal MainPage(ContentSystem 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);
}
}
}