This commit is contained in:
gravity 2023-08-17 23:55:17 +03:00
parent b848347c56
commit 5b5fd85436
2 changed files with 3 additions and 9 deletions

View file

@ -11,7 +11,6 @@ namespace DangerousD.GameCore.GUI
{
public class HUD : AbstractGui
{
Button[] buttons = new Button[2];
int ammout = 0;
List<Rect> rects = new List<Rect> { };
int wigth = AppManager.Instance.inGameResolution.X;
@ -24,10 +23,6 @@ namespace DangerousD.GameCore.GUI
Elements.Add(rect);
Label label = new Label(Manager) { rectangle = new Rectangle(wigth / 34, height / 30, 120, 20), text = "ammout", fontName = "font2", scale = 0.2f, mainColor = Color.Transparent, fontColor = Color.Black };
Elements.Add(label);
buttons[0] = new Button(Manager) { rectangle = new Rectangle(300, 300, 50, 50), text = ammout.ToString() };
Elements.Add(buttons[0]);
buttons[1] = new Button(Manager) { rectangle = new Rectangle(300, 400, 50, 50) };
Elements.Add(buttons[1]);
}
public override void Update(GameTime gameTime)
@ -35,8 +30,7 @@ namespace DangerousD.GameCore.GUI
rects.Clear();
for (int i = 0; i < ammout; i++)
{ ammout += 1;
ammout %= 8;
{
rects.Add(new Rect(Manager) { rectangle = new Rectangle(wigth / 29 + i * 13, height / 17, 5, 20), mainColor = Color.Yellow });
rects[i].LoadTexture(AppManager.Instance.Content);
}

View file

@ -56,8 +56,8 @@ namespace DangerousD.GameCore
resolution = SettingsManager.Resolution;
_graphics.PreferredBackBufferWidth = resolution.X;
_graphics.PreferredBackBufferHeight = resolution.Y;
//_graphics.IsFullScreen = true;
gameState = GameState.HUD;
_graphics.IsFullScreen = true;
gameState = GameState.Menu;
MenuGUI = new MenuGUI();
LoginGUI = new LoginGUI();
OptionsGUI = new OptionsGUI();