AddLoginGUI

This commit is contained in:
polten0 2023-08-15 12:12:15 +03:00
parent 8477a3a274
commit e642e53f06
2 changed files with 22 additions and 1 deletions

View 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) });
}
}
}

View file

@ -16,9 +16,10 @@ namespace DangerousD.GameCore
public static AppManager Instance { get; private set; }
private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;
public Point resolution;
GameState gameState;
IDrawableObject MenuGUI;
IDrawableObject OptionsGUI;
IDrawableObject LoginGUI;
IDrawableObject LobbyGUI;
public GameManager GameManager { get; private set; }
public AnimationBuilder AnimationBuilder { get; private set; } = new AnimationBuilder();
@ -30,6 +31,7 @@ namespace DangerousD.GameCore
IsMouseVisible = true;
TargetElapsedTime = TimeSpan.FromMilliseconds(1000 / 30);
resolution = new Point(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight);
GameManager = new GameManager();
gameState = GameState.Menu;
MenuGUI = new MenuGUI();