diff --git a/DangerousD/GameCore/GUI/LoginGUI.cs b/DangerousD/GameCore/GUI/LoginGUI.cs new file mode 100644 index 0000000..311c480 --- /dev/null +++ b/DangerousD/GameCore/GUI/LoginGUI.cs @@ -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) }); + } + } +} diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 4bcd14b..c48beb1 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -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();