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>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Zer01HD\Game\MainScreen\MainPage.cs" />
|
||||||
<Compile Include="Zer01HD\UI\Page\Page.cs" />
|
<Compile Include="Zer01HD\UI\Page\Page.cs" />
|
||||||
<Compile Include="RhythmBulletGame.cs" />
|
<Compile Include="RhythmBulletGame.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
|
@ -10,9 +10,9 @@ namespace RhythmBullet
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class RhythmBulletGame : Game
|
public class RhythmBulletGame : Game
|
||||||
{
|
{
|
||||||
private Screen currentScreen;
|
public Screen currentScreen;
|
||||||
|
|
||||||
GraphicsDeviceManager graphics;
|
private GraphicsDeviceManager graphics;
|
||||||
SpriteBatch spriteBatch;
|
SpriteBatch spriteBatch;
|
||||||
|
|
||||||
public RhythmBulletGame()
|
public RhythmBulletGame()
|
||||||
@ -81,5 +81,22 @@ namespace RhythmBullet
|
|||||||
|
|
||||||
base.Draw(gameTime);
|
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
|
namespace RhythmBullet.Zer01HD.Game.MainScreen
|
||||||
{
|
{
|
||||||
class MainPage : Page
|
public class MainPage : Page
|
||||||
{
|
{
|
||||||
public MainPage(int pageX, int pageY) : base(pageX, pageY)
|
public MainPage(int pageX, int pageY) : base(pageX, pageY)
|
||||||
{
|
{
|
||||||
|
@ -8,9 +8,10 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace RhythmBullet.Zer01HD.UI
|
namespace RhythmBullet.Zer01HD.UI
|
||||||
{
|
{
|
||||||
class Page
|
public class Page
|
||||||
{
|
{
|
||||||
private readonly int pageX, pageY;
|
private readonly int pageX, pageY;
|
||||||
|
public readonly int xPos, yPos;
|
||||||
public Page(int pageX, int pageY)
|
public Page(int pageX, int pageY)
|
||||||
{
|
{
|
||||||
this.pageX = pageX;
|
this.pageX = pageX;
|
||||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace RhythmBullet.Zer01HD.UI.Screen
|
namespace RhythmBullet.Zer01HD.UI.Screen
|
||||||
{
|
{
|
||||||
class Screen
|
public class Screen
|
||||||
{
|
{
|
||||||
public void Update(GameTime gameTime)
|
public void Update(GameTime gameTime)
|
||||||
{
|
{
|
||||||
@ -29,5 +29,10 @@ namespace RhythmBullet.Zer01HD.UI.Screen
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resize()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user