AddLoginGUI
This commit is contained in:
parent
8477a3a274
commit
e642e53f06
2 changed files with 22 additions and 1 deletions
19
DangerousD/GameCore/GUI/LoginGUI.cs
Normal file
19
DangerousD/GameCore/GUI/LoginGUI.cs
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
|
||||||
|
using MonogameLibrary.UI.Elements;
|
||||||
|
|
||||||
|
namespace DangerousD.GameCore.GUI
|
||||||
|
{
|
||||||
|
class LoginGUI : AbstractGui
|
||||||
|
{
|
||||||
|
protected override void CreateUI()
|
||||||
|
{
|
||||||
|
Elements.Add(new Label(Manager) { rectangle = new Rectangle(AppManager.Instance.resolution.X / 2, AppManager.Instance.resolution.Y / 2, 100, 50) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,9 +16,10 @@ namespace DangerousD.GameCore
|
||||||
public static AppManager Instance { get; private set; }
|
public static AppManager Instance { get; private set; }
|
||||||
private GraphicsDeviceManager _graphics;
|
private GraphicsDeviceManager _graphics;
|
||||||
private SpriteBatch _spriteBatch;
|
private SpriteBatch _spriteBatch;
|
||||||
|
public Point resolution;
|
||||||
GameState gameState;
|
GameState gameState;
|
||||||
IDrawableObject MenuGUI;
|
IDrawableObject MenuGUI;
|
||||||
IDrawableObject OptionsGUI;
|
IDrawableObject LoginGUI;
|
||||||
IDrawableObject LobbyGUI;
|
IDrawableObject LobbyGUI;
|
||||||
public GameManager GameManager { get; private set; }
|
public GameManager GameManager { get; private set; }
|
||||||
public AnimationBuilder AnimationBuilder { get; private set; } = new AnimationBuilder();
|
public AnimationBuilder AnimationBuilder { get; private set; } = new AnimationBuilder();
|
||||||
|
@ -30,6 +31,7 @@ namespace DangerousD.GameCore
|
||||||
IsMouseVisible = true;
|
IsMouseVisible = true;
|
||||||
TargetElapsedTime = TimeSpan.FromMilliseconds(1000 / 30);
|
TargetElapsedTime = TimeSpan.FromMilliseconds(1000 / 30);
|
||||||
|
|
||||||
|
resolution = new Point(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight);
|
||||||
GameManager = new GameManager();
|
GameManager = new GameManager();
|
||||||
gameState = GameState.Menu;
|
gameState = GameState.Menu;
|
||||||
MenuGUI = new MenuGUI();
|
MenuGUI = new MenuGUI();
|
||||||
|
|
Loading…
Add table
Reference in a new issue