rhythmbullet/RhythmBullet/Screens/MainMenu/MainPage.cs

36 lines
1.0 KiB
C#
Raw Normal View History

2018-11-13 01:54:33 +00:00
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RhythmBullet.UI.Book;
using RhythmBullet.Utilities.ContentSystem;
using RhythmBullet.Utilities.UI.Modular.Modules;
2018-11-22 07:12:40 +00:00
using RhythmBullet.Utilities.UI.Modular.Modules.Interactive;
2018-11-13 00:50:00 +00:00
namespace RhythmBullet.Screens.MainMenu
2018-11-13 00:50:00 +00:00
{
internal class MainPage : Page
{
2018-11-15 07:22:35 +00:00
Image title;
2018-11-22 07:12:40 +00:00
TextButton playButton;
TextButton quitButton;
internal MainPage(ContentManagerController 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);
2018-11-15 07:22:35 +00:00
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
}
}
}