began implementing changes in RA.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using RecrownedAthenaeum.ContentSystem;
|
||||
using RecrownedAthenaeum.UI.Book;
|
||||
using RecrownedAthenaeum.UI.BookSystem;
|
||||
using RecrownedAthenaeum.UI.Modular.Modules;
|
||||
using RecrownedAthenaeum.UI.Modular.Modules.Interactive;
|
||||
using RecrownedAthenaeum.UI.SkinSystem;
|
||||
using RecrownedAthenaeum.UI.SkinSystem.Definitions;
|
||||
|
||||
namespace RhythmBullet.Screens.MainMenu
|
||||
{
|
||||
@@ -12,18 +15,33 @@ namespace RhythmBullet.Screens.MainMenu
|
||||
TextButton playButton;
|
||||
TextButton quitButton;
|
||||
|
||||
internal MainPage(ContentManagerController assets) : base(0, 0)
|
||||
internal MainPage() : base(0, 0)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Initialize(ContentManagerController assets, ISkin skin)
|
||||
{
|
||||
title = new Image(assets.Get<Texture2D>("title"));
|
||||
AddModule(title);
|
||||
|
||||
SpriteFont font = assets.Get<SpriteFont>("gasalt_regular");
|
||||
|
||||
var test = skin.ObtainDefinition<TextButtonSkinDefinition>(typeof(TextButton));
|
||||
|
||||
playButton = new TextButton("Play!", font, skin);
|
||||
AddModule(playButton);
|
||||
|
||||
quitButton = new TextButton("Quit", font, skin);
|
||||
AddModule(quitButton);
|
||||
}
|
||||
|
||||
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);
|
||||
title.CenterOrigin();
|
||||
title.bounds.X = width / 2;
|
||||
title.bounds.Y = height / 2;
|
||||
|
||||
base.ApplySize(width, height);
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,8 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using RecrownedAthenaeum.Camera;
|
||||
using RecrownedAthenaeum.ContentSystem;
|
||||
using RecrownedAthenaeum.ScreenSystem;
|
||||
using RecrownedAthenaeum.UI.Book;
|
||||
using RecrownedAthenaeum.UI.BookSystem;
|
||||
using RecrownedAthenaeum.UI.SkinSystem;
|
||||
using RhythmBullet.Screens.Transitions;
|
||||
|
||||
namespace RhythmBullet.Screens.MainMenu
|
||||
@@ -16,13 +17,13 @@ namespace RhythmBullet.Screens.MainMenu
|
||||
readonly Book book;
|
||||
readonly MainPage mainPage;
|
||||
|
||||
public MainScreen(ContentManagerController assets) : base(true)
|
||||
public MainScreen(ContentManagerController assets, ISkin skin) : base(true)
|
||||
{
|
||||
this.assets = assets;
|
||||
background = assets.Get<Texture2D>("backgrounds/mainBG");
|
||||
fat = new FadeAwayTransition(1.5f);
|
||||
book = new Book();
|
||||
mainPage = new MainPage(assets);
|
||||
book = new Book(assets, skin);
|
||||
mainPage = new MainPage();
|
||||
book.AddPages(mainPage);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user