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

32 lines
955 B
C#
Raw Normal View History

2018-11-13 01:54:33 +00:00
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
2018-11-13 00:50:00 +00:00
using RhythmBullet.Zer01HD.UI.Book;
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
2018-11-15 07:22:35 +00:00
using RhythmBullet.Zer01HD.Utilities.UI.Modular.Modules;
2018-11-13 00:50:00 +00:00
namespace RhythmBullet.Zer01HD.Game.Screens.MainMenu
{
internal class MainPage : Page
{
2018-11-15 07:22:35 +00:00
Image title;
internal MainPage(ContentSystem assets) : base(0, 0)
2018-11-13 00:50:00 +00:00
{
2018-11-15 07:22:35 +00:00
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);
2018-11-13 01:54:33 +00:00
}
public override void Draw(SpriteBatch batch)
{
base.Draw(batch);
2018-11-13 00:50:00 +00:00
}
}
}