began main page with reorganization.

This commit is contained in:
Harrison Deng 2018-11-12 18:50:00 -06:00
parent b1e2721850
commit 51f13b1578
5 changed files with 27 additions and 5 deletions

View File

@ -47,6 +47,7 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Compile Include="Zer01HD\Game\Screens\MainMenu\MainPage.cs" />
<Compile Include="Zer01HD\Game\Screens\Transitions\FadeAwayTransition.cs" />
<Compile Include="Zer01HD\Utilities\Camera\Camera2D.cs" />
<Compile Include="Zer01HD\Utilities\ContentSystem\NormalContentResolver.cs" />
@ -57,7 +58,7 @@
<Compile Include="Zer01HD\Utilities\UI\Interactive\BasicButton.cs" />
<Compile Include="Zer01HD\Utilities\ScreenSystem\ITransition.cs" />
<Compile Include="Zer01HD\Utilities\ScreenSystem\LoadingScreen.cs" />
<Compile Include="Zer01HD\Game\Screens\MainScreen.cs" />
<Compile Include="Zer01HD\Game\Screens\MainMenu\MainScreen.cs" />
<Compile Include="Zer01HD\Utilities\UI\Modular\UIModule.cs" />
<Compile Include="Zer01HD\Utilities\UI\Modular\UIModuleGroup.cs" />
<Compile Include="RhythmBulletGame.cs" />

View File

@ -3,7 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using RhythmBullet.Zer01HD.Game.ContentResolvers;
using RhythmBullet.Zer01HD.Game.Preferences;
using RhythmBullet.Zer01HD.Game.Screens;
using RhythmBullet.Zer01HD.Game.Screens.MainMenu;
using RhythmBullet.Zer01HD.Utilities;
using RhythmBullet.Zer01HD.Utilities.Camera;
using RhythmBullet.Zer01HD.Utilities.ContentSystem;

View File

@ -0,0 +1,19 @@
using Microsoft.Xna.Framework.Graphics;
using RhythmBullet.Zer01HD.UI.Book;
using RhythmBullet.Zer01HD.Utilities.ContentSystem;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Game.Screens.MainMenu
{
internal class MainPage : Page
{
internal MainPage(ContentSystem assets, GraphicsDevice graphicsDevice) : base(0, 0, graphicsDevice)
{
assets.Get<Texture2D>("title");
}
}
}

View File

@ -13,7 +13,7 @@ using System.Text;
using System.Threading.Tasks;
using RhythmBullet.Zer01HD.UI.Book;
namespace RhythmBullet.Zer01HD.Game.Screens
namespace RhythmBullet.Zer01HD.Game.Screens.MainMenu
{
class MainScreen : Screen
{

View File

@ -12,12 +12,14 @@ namespace RhythmBullet.Zer01HD.UI.Book
class Page : UIModuleGroup
{
private readonly int pageX, pageY;
private GraphicsDevice graphicsDevice;
public Page(int pageX, int pageY, int width, int height)
public Page(int pageX, int pageY, GraphicsDevice graphicsDevice)
{
this.graphicsDevice = graphicsDevice;
this.pageX = pageX;
this.pageY = pageY;
ApplySize(width, height);
ApplySize(graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height);
}
public virtual void ApplySize(int width, int height)