add_class

This commit is contained in:
dvaer 2024-08-15 02:04:45 +03:00
parent b583fee683
commit 0018fbb894
10 changed files with 263 additions and 1 deletions

View file

@ -29,7 +29,8 @@ public abstract class AbstractGUI
private GraphicsDevice graphicsDevice; private GraphicsDevice graphicsDevice;
public virtual void Initialize() public virtual void Initialize()
{ {
// Manager.Initialize(AppManager.Instance.GraphicsDevice);
CreateUI();
} }
public virtual void LoadContent() public virtual void LoadContent()

View file

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class BaseGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class GameEndedGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

44
ZoFo/GameCore/GUI/HUD.cs Normal file
View file

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class HUD
{
protected UIManager Manager = new();
protected List<DrawableUIElement> Elements = new();
private List<DrawableUIElement> ActiveElements;
protected DrawableUIElement SelectedElement;
private bool isStartedPrint = false;
private bool isPressed = false;
private GraphicsDevice graphicsDevice;
public virtual void Initialize()
{
}
public virtual void LoadContent()
{
}
public virtual void Update(GameTime gameTime)
{
}
public virtual void Draw(SpriteBatch spriteBatch)
{
Manager.Draw(spriteBatch);
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class InventoryGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class MainMenuGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class OptionsGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class SelectModeMenu : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class SelectingServerGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace ZoFo.GameCore.GUI;
public class WaitingForPlayersGUI : AbstractGUI
{
protected override void CreateUI()
{
// int width = AppManager.Instance.inGameHUDHelperResolution.X;
// int height = AppManager.Instance.inGameHUDHelperResolution.Y;
}
public override void Update(GameTime gameTime)
{
}
}