began implementing resize while further developing ui system
This commit is contained in:
parent
073f3a205d
commit
8d80913fe2
@ -42,6 +42,7 @@
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Zer01HD\Game\MainScreen\MainPage.cs" />
|
||||
<Compile Include="Zer01HD\UI\Page\Page.cs" />
|
||||
<Compile Include="RhythmBulletGame.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
|
@ -10,9 +10,9 @@ namespace RhythmBullet
|
||||
/// </summary>
|
||||
public class RhythmBulletGame : Game
|
||||
{
|
||||
private Screen currentScreen;
|
||||
public Screen currentScreen;
|
||||
|
||||
GraphicsDeviceManager graphics;
|
||||
private GraphicsDeviceManager graphics;
|
||||
SpriteBatch spriteBatch;
|
||||
|
||||
public RhythmBulletGame()
|
||||
@ -81,5 +81,22 @@ namespace RhythmBullet
|
||||
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
|
||||
public int getWidth()
|
||||
{
|
||||
return graphics.PreferredBackBufferWidth;
|
||||
}
|
||||
|
||||
public int getHeight()
|
||||
{
|
||||
return graphics.PreferredBackBufferHeight;
|
||||
}
|
||||
|
||||
public void resize(int width, int height)
|
||||
{
|
||||
graphics.PreferredBackBufferWidth = width;
|
||||
graphics.PreferredBackBufferHeight = height;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.Game.MainScreen
|
||||
{
|
||||
class MainPage : Page
|
||||
public class MainPage : Page
|
||||
{
|
||||
public MainPage(int pageX, int pageY) : base(pageX, pageY)
|
||||
{
|
||||
|
@ -8,18 +8,19 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.UI
|
||||
{
|
||||
class Page
|
||||
public class Page
|
||||
{
|
||||
private readonly int pageX, pageY;
|
||||
public readonly int xPos, yPos;
|
||||
public Page(int pageX, int pageY)
|
||||
{
|
||||
this.pageX = pageX;
|
||||
this.pageY = pageY;
|
||||
}
|
||||
}
|
||||
|
||||
public void Update(GameTime gameTime)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Draw(SpriteBatch batch)
|
||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Zer01HD.UI.Screen
|
||||
{
|
||||
class Screen
|
||||
public class Screen
|
||||
{
|
||||
public void Update(GameTime gameTime)
|
||||
{
|
||||
@ -29,5 +29,10 @@ namespace RhythmBullet.Zer01HD.UI.Screen
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void resize()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user