From de702b6a8ed76d385bf9898438e158ddb184513f Mon Sep 17 00:00:00 2001 From: polten0 Date: Fri, 18 Aug 2023 02:00:58 +0300 Subject: [PATCH 1/9] FirstNotGoodWorkUI --- DangerousD/GameCore/GUI/AbstractGui.cs | 133 +++++++++++++++++++++++++ MonogameLibrary/UI/Elements/Button.cs | 6 +- 2 files changed, 138 insertions(+), 1 deletion(-) diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs index 7f7b212..6615820 100644 --- a/DangerousD/GameCore/GUI/AbstractGui.cs +++ b/DangerousD/GameCore/GUI/AbstractGui.cs @@ -1,8 +1,13 @@ 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 DangerousD.GameCore.GUI; @@ -10,6 +15,9 @@ public abstract class AbstractGui : IDrawableObject { protected UIManager Manager = new(); protected List Elements = new(); + private List ActiveElements; + protected DrawableUIElement SelectedElement; + private bool isPressed = false; public AbstractGui() { @@ -22,6 +30,16 @@ public abstract class AbstractGui : IDrawableObject Manager.Initialize(AppManager.Instance.GraphicsDevice); this.graphicsDevice = graphicsDevice; CreateUI(); + ActiveElements = new List(); + foreach (var element in Elements) + { + if (CheckOnBadElements(element)) + { + ActiveElements.Add(element); + } + } + if (ActiveElements.Count > 0) { SelectedElement = ActiveElements.First(); } + } public virtual void LoadContent() @@ -31,6 +49,25 @@ public abstract class AbstractGui : IDrawableObject public virtual void Update(GameTime gameTime) { + string state = AppManager.Instance.InputManager.currentControlsState; + + if (ActiveElements.Count != 0) + { + switch (state) + { + case "Gamepad": + GamePadState gamePadState = GamePad.GetState(0); + GamepadInput(gamePadState); + break; + case "Keyboard": + KeyboardState keyBoardState = Keyboard.GetState(0); + KeyBoardInput(keyBoardState); + break; + default: + break; + } + } + Manager.Update(); } @@ -38,4 +75,100 @@ public abstract class AbstractGui : IDrawableObject { Manager.Draw(spriteBatch); } + protected virtual void GamepadInput(GamePadState gamePadState) + { + if (gamePadState.DPad.Up == ButtonState.Pressed && !isPressed) + { + isPressed = true; + ChangeSelectedElement(-1); + } + else if (gamePadState.DPad.Down == ButtonState.Pressed && !isPressed) + { + isPressed = true; + ChangeSelectedElement(1); + } + else if (gamePadState.Buttons.A == ButtonState.Pressed && !isPressed) + { + Debug.WriteLine("ssss"); + isPressed = true; + if (SelectedElement is ButtonText) + { + Button button = SelectedElement as ButtonText; + button.CallLeftBtnEvent(); + } + } + else if (isPressed) + { + isPressed = false; + } + } + protected virtual void KeyBoardInput(KeyboardState keyboardState) + { + if (keyboardState.IsKeyDown(Keys.Up) && !isPressed) + { + isPressed = true; + ChangeSelectedElement(-1); + } + else if (keyboardState.IsKeyDown(Keys.Down) && !isPressed) + { + isPressed = true; + ChangeSelectedElement(1); + } + else if (keyboardState.IsKeyDown(Keys.Enter) && !isPressed) + { + isPressed = true; + if (SelectedElement is Button) + { + Button button = SelectedElement as Button; + button.CallLeftBtnEvent(); + } + } + else if (isPressed) + { + isPressed = false; + } + } + private void ChangeSelectedElement(int x) // Меняет выбранный элемент + { + for (int i = 0; i < ActiveElements.Count; i++) + { + if (ActiveElements[i] == SelectedElement) + { + if (i == 0) + { + SelectedElement = ActiveElements.Last(); + } + else + { + if (i == ActiveElements.Count - 1 && x >= 1) + { + SelectedElement = ActiveElements.First(); + } + else + { + SelectedElement = ActiveElements[i + x]; + } + + } + + } + + } + } + private bool CheckOnBadElements(DrawableUIElement element) + { + if (element is Button) + { + return true; + } + else if (element is ButtonText) + { + return true; + } + else if (element is CheckBox) + { + return true; + } + else return false; + } } \ No newline at end of file diff --git a/MonogameLibrary/UI/Elements/Button.cs b/MonogameLibrary/UI/Elements/Button.cs index cf7d5ce..051f31f 100644 --- a/MonogameLibrary/UI/Elements/Button.cs +++ b/MonogameLibrary/UI/Elements/Button.cs @@ -40,7 +40,7 @@ namespace MonogameLibrary.UI.Elements if (mouseState.LeftButton != prevmouseState.LeftButton) { hoverState = HoverState.Pressing; - LeftButtonPressed?.Invoke(); + CallLeftBtnEvent(); return true; } } @@ -77,5 +77,9 @@ namespace MonogameLibrary.UI.Elements DrawText(_spriteBatch); } + public void CallLeftBtnEvent() + { + LeftButtonPressed?.Invoke(); + } } } From 1f3108adcdd37ef6bbcf3653bf7ab4067dcde61c Mon Sep 17 00:00:00 2001 From: polten0 Date: Fri, 18 Aug 2023 02:46:59 +0300 Subject: [PATCH 2/9] finish1IterOfSwitchingUI --- DangerousD/GameCore/GUI/AbstractGui.cs | 51 ++++++++++--------- .../LivingEntities/Player/Player.cs | 1 + DangerousD/GameCore/InputManager.cs | 1 + MonogameLibrary/UI/Elements/Button.cs | 2 +- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs index 6615820..34bea14 100644 --- a/DangerousD/GameCore/GUI/AbstractGui.cs +++ b/DangerousD/GameCore/GUI/AbstractGui.cs @@ -51,24 +51,25 @@ public abstract class AbstractGui : IDrawableObject { string state = AppManager.Instance.InputManager.currentControlsState; + + if (ActiveElements.Count != 0) { - switch (state) + if (state == "Gamepad") { - case "Gamepad": - GamePadState gamePadState = GamePad.GetState(0); - GamepadInput(gamePadState); - break; - case "Keyboard": - KeyboardState keyBoardState = Keyboard.GetState(0); - KeyBoardInput(keyBoardState); - break; - default: - break; + GamePadState gamePadState = GamePad.GetState(0); + GamepadInput(gamePadState); + } + else if (state == "Keyboard" || state == "Mouse") + { + KeyboardState keyBoardState = Keyboard.GetState(); + KeyBoardInput(keyBoardState); } } Manager.Update(); + + (SelectedElement as Button).hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering; } public virtual void Draw(SpriteBatch spriteBatch) @@ -81,6 +82,7 @@ public abstract class AbstractGui : IDrawableObject { isPressed = true; ChangeSelectedElement(-1); + Debug.WriteLine("switch"); } else if (gamePadState.DPad.Down == ButtonState.Pressed && !isPressed) { @@ -89,7 +91,6 @@ public abstract class AbstractGui : IDrawableObject } else if (gamePadState.Buttons.A == ButtonState.Pressed && !isPressed) { - Debug.WriteLine("ssss"); isPressed = true; if (SelectedElement is ButtonText) { @@ -97,7 +98,9 @@ public abstract class AbstractGui : IDrawableObject button.CallLeftBtnEvent(); } } - else if (isPressed) + else if (isPressed && (gamePadState.Buttons.A == ButtonState.Released && + gamePadState.DPad.Down == ButtonState.Released && + gamePadState.DPad.Up == ButtonState.Released)) { isPressed = false; } @@ -123,7 +126,9 @@ public abstract class AbstractGui : IDrawableObject button.CallLeftBtnEvent(); } } - else if (isPressed) + else if (isPressed && (keyboardState.IsKeyUp(Keys.Enter) && + keyboardState.IsKeyUp(Keys.Down) && + keyboardState.IsKeyUp(Keys.Up))) { isPressed = false; } @@ -134,25 +139,25 @@ public abstract class AbstractGui : IDrawableObject { if (ActiveElements[i] == SelectedElement) { - if (i == 0) + if (i + x >= ActiveElements.Count) { - SelectedElement = ActiveElements.Last(); + SelectedElement = ActiveElements.First(); + return; } else { - if (i == ActiveElements.Count - 1 && x >= 1) + if (i + x < 0) { - SelectedElement = ActiveElements.First(); + SelectedElement = ActiveElements.Last(); + return; } else { SelectedElement = ActiveElements[i + x]; + return; } - } - } - } } private bool CheckOnBadElements(DrawableUIElement element) @@ -165,10 +170,6 @@ public abstract class AbstractGui : IDrawableObject { return true; } - else if (element is CheckBox) - { - return true; - } else return false; } } \ No newline at end of file diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index 066b1d4..eef557f 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -9,6 +9,7 @@ using DangerousD.GameCore.GameObjects.PlayerDeath; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Graphics; using DangerousD.GameCore.GameObjects.LivingEntities.Monsters; +using DangerousD.GameCore.Network; namespace DangerousD.GameCore.GameObjects.LivingEntities { diff --git a/DangerousD/GameCore/InputManager.cs b/DangerousD/GameCore/InputManager.cs index c171d6b..3846bc2 100644 --- a/DangerousD/GameCore/InputManager.cs +++ b/DangerousD/GameCore/InputManager.cs @@ -158,6 +158,7 @@ namespace DangerousD.GameCore { isShoot = false; } + SetState(ControlsState.Keyboard); } } } diff --git a/MonogameLibrary/UI/Elements/Button.cs b/MonogameLibrary/UI/Elements/Button.cs index 051f31f..769335f 100644 --- a/MonogameLibrary/UI/Elements/Button.cs +++ b/MonogameLibrary/UI/Elements/Button.cs @@ -16,7 +16,7 @@ namespace MonogameLibrary.UI.Elements public delegate void OnButtonPressed(); public event OnButtonPressed? RightButtonPressed; public event OnButtonPressed? LeftButtonPressed; - protected HoverState hoverState = HoverState.None; + public HoverState hoverState = HoverState.None; public Button(UIManager manager, int layerIndex = 0) : base(manager, layerIndex) { From b37fbaf4ea1f526c643ac7b83b20209b32136ffd Mon Sep 17 00:00:00 2001 From: gravity Date: Fri, 18 Aug 2023 03:05:57 +0300 Subject: [PATCH 3/9] UI_fullscreen --- DangerousD/GameCore/GUI/DeathGUI.cs | 12 +++++++ DangerousD/GameCore/GUI/LobbyGUI.cs | 21 ++++++++++++ DangerousD/GameCore/GUI/LoginGUI.cs | 17 ++++++++++ DangerousD/GameCore/GUI/MenuGUI.cs | 19 +++++++++-- DangerousD/GameCore/GUI/OptionsGUI.cs | 29 +++++++++++++---- DangerousD/GameCore/Managers/AppManager.cs | 32 +++++++++++++++---- .../GameCore/Managers/SettingsManager.cs | 6 +++- 7 files changed, 119 insertions(+), 17 deletions(-) diff --git a/DangerousD/GameCore/GUI/DeathGUI.cs b/DangerousD/GameCore/GUI/DeathGUI.cs index 5754efa..c19f9b5 100644 --- a/DangerousD/GameCore/GUI/DeathGUI.cs +++ b/DangerousD/GameCore/GUI/DeathGUI.cs @@ -13,6 +13,7 @@ internal class DeathGUI : AbstractGui { int wigth = AppManager.Instance.inGameResolution.X; int height = AppManager.Instance.inGameResolution.Y; + float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "deathBackground" }; Elements.Add(menuBackground); menuBackground.LoadTexture(AppManager.Instance.Content); @@ -24,6 +25,17 @@ internal class DeathGUI : AbstractGui { AppManager.Instance.ChangeGameState(GameState.Menu); }; + foreach (var item in Elements) + { + item.rectangle.X = (int)(scaler * item.rectangle.X); + item.rectangle.Y = (int)(scaler * item.rectangle.Y); + item.rectangle.Width = (int)(scaler * item.rectangle.Width); + item.rectangle.Height = (int)(scaler * item.rectangle.Height); + if (item is DrawableTextedUiElement) + { + (item as DrawableTextedUiElement).scale *= scaler; + } + } } public override void Update(GameTime gameTime) diff --git a/DangerousD/GameCore/GUI/LobbyGUI.cs b/DangerousD/GameCore/GUI/LobbyGUI.cs index 9136760..3b8b9ab 100644 --- a/DangerousD/GameCore/GUI/LobbyGUI.cs +++ b/DangerousD/GameCore/GUI/LobbyGUI.cs @@ -25,6 +25,7 @@ namespace DangerousD.GameCore.GUI { int screenWidth = AppManager.Instance.inGameResolution.X; int screenHeight = AppManager.Instance.inGameResolution.Y; + float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; var lobbyBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, screenWidth, screenHeight), textureName = "menuFon3" }; Elements.Add(lobbyBackground); @@ -51,6 +52,7 @@ namespace DangerousD.GameCore.GUI textureName = "textboxbackground6-1" }; + Elements.Add(searchBarTextBox); searchBarTextBox.TextChanged += input => { if (searchBarTextBox.fontColor == Color.Gray) { @@ -73,6 +75,7 @@ namespace DangerousD.GameCore.GUI fontName = "font2", textureName = "textboxbackground1-1" }; + Elements.Add(backButton); backButton.LeftButtonPressed += () => { AppManager.Instance.ChangeGameState(GameState.Menu); }; @@ -86,6 +89,7 @@ namespace DangerousD.GameCore.GUI fontName = "buttonFont", textureName = "textboxbackground2-1" }; + Elements.Add(hostButton); hostButton.LeftButtonPressed += () => { AppManager.Instance.ChangeGameState(GameState.Game); AppManager.Instance.NetworkManager.HostInit(AppManager.Instance.IpAddress); @@ -101,6 +105,7 @@ namespace DangerousD.GameCore.GUI fontName = "buttonFont", textureName = "textboxbackground2-1" }; + Elements.Add(refreshButton); refreshButton.LeftButtonPressed += () => { }; @@ -114,6 +119,7 @@ namespace DangerousD.GameCore.GUI fontName = "buttonFont", textureName = "textboxbackground2-1" }; + Elements.Add(joinSelectedButton); joinSelectedButton.LeftButtonPressed += () => { AppManager.Instance.ChangeGameState(GameState.Game); AppManager.Instance.NetworkManager.ClientInit(AppManager.Instance.IpAddress); @@ -127,10 +133,25 @@ namespace DangerousD.GameCore.GUI fontName = "buttonFont", textureName = "textboxbackground2-1" }; + Elements.Add(joinByIpButton); joinByIpButton.LeftButtonPressed += () => { AppManager.Instance.NetworkManager.ClientInit(searchBarTextBox.text); }; } + + + + foreach (var item in Elements) + { + item.rectangle.X = (int)(scaler * item.rectangle.X); + item.rectangle.Y = (int)(scaler * item.rectangle.Y); + item.rectangle.Width = (int)(scaler * item.rectangle.Width); + item.rectangle.Height = (int)(scaler * item.rectangle.Height); + if (item is DrawableTextedUiElement) + { + (item as DrawableTextedUiElement).scale *= scaler; + } + } } } } diff --git a/DangerousD/GameCore/GUI/LoginGUI.cs b/DangerousD/GameCore/GUI/LoginGUI.cs index 37a62eb..de0a68c 100644 --- a/DangerousD/GameCore/GUI/LoginGUI.cs +++ b/DangerousD/GameCore/GUI/LoginGUI.cs @@ -26,6 +26,7 @@ namespace DangerousD.GameCore.GUI { int screenWidth = AppManager.Instance.inGameResolution.X; int screenHeight = AppManager.Instance.inGameResolution.Y; + float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; var loginBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, screenWidth, screenHeight), textureName = "menuFon2" }; Elements.Add(loginBackground); @@ -53,6 +54,7 @@ namespace DangerousD.GameCore.GUI textureName = "textboxbackground6-1" }; + Elements.Add(loginTextBox); loginTextBox.LoadTexture(AppManager.Instance.Content); loginTextBox.TextChanged += input => { if (loginTextBox.fontColor == Color.Gray) @@ -78,6 +80,7 @@ namespace DangerousD.GameCore.GUI textAligment = TextAligment.Left, textureName = "textboxbackground6-1" }; + Elements.Add(passwordTextBox); passwordTextBox.LoadTexture(AppManager.Instance.Content); passwordTextBox.TextChanged += input => { if (passwordTextBox.fontColor == Color.Gray) @@ -104,6 +107,7 @@ namespace DangerousD.GameCore.GUI fontName = "ButtonFont", textureName = "textboxbackground2-1" }; + Elements.Add(logButton); logButton.LeftButtonPressed += () => { if (CheckUser()) { @@ -120,6 +124,7 @@ namespace DangerousD.GameCore.GUI fontName = "ButtonFont", textureName = "textboxbackground2-1" }; + Elements.Add(regButton); regButton.LeftButtonPressed += GoToRegWebServer; Button backButton = new Button(Manager) @@ -131,10 +136,22 @@ namespace DangerousD.GameCore.GUI fontName = "font2", textureName = "textboxbackground1-1" }; + Elements.Add(backButton); backButton.LeftButtonPressed += () => { AppManager.Instance.ChangeGameState(GameState.Menu); }; } + foreach (var item in Elements) + { + item.rectangle.X = (int)(scaler * item.rectangle.X); + item.rectangle.Y = (int)(scaler * item.rectangle.Y); + item.rectangle.Width = (int)(scaler * item.rectangle.Width); + item.rectangle.Height = (int)(scaler * item.rectangle.Height); + if (item is DrawableTextedUiElement) + { + (item as DrawableTextedUiElement).scale *= scaler; + } + } } private void GoToRegWebServer() diff --git a/DangerousD/GameCore/GUI/MenuGUI.cs b/DangerousD/GameCore/GUI/MenuGUI.cs index 82170b1..d6e376e 100644 --- a/DangerousD/GameCore/GUI/MenuGUI.cs +++ b/DangerousD/GameCore/GUI/MenuGUI.cs @@ -13,9 +13,10 @@ internal class MenuGUI : AbstractGui int selected = 0; protected override void CreateUI() { - int wigth = AppManager.Instance.inGameResolution.X; - int height = AppManager.Instance.inGameResolution.Y; - + int wigth = AppManager.Instance.inGameHUDHelperResolution.X; + int height = AppManager.Instance.inGameHUDHelperResolution.Y; + float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; + var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "menuFon" }; Elements.Add(menuBackground); menuBackground.LoadTexture(AppManager.Instance.Content); @@ -59,6 +60,18 @@ internal class MenuGUI : AbstractGui { AppManager.Instance.Exit(); }; + + foreach ( var item in Elements) + { + item.rectangle.X = (int)(scaler * item.rectangle.X); + item.rectangle.Y = (int)(scaler * item.rectangle.Y); + item.rectangle.Width = (int)(scaler * item.rectangle.Width); + item.rectangle.Height = (int)(scaler * item.rectangle.Height); + if (item is DrawableTextedUiElement) + { + (item as DrawableTextedUiElement).scale *= scaler; + } + } } public override void Update(GameTime gameTime) diff --git a/DangerousD/GameCore/GUI/OptionsGUI.cs b/DangerousD/GameCore/GUI/OptionsGUI.cs index 6fc95c7..c879731 100644 --- a/DangerousD/GameCore/GUI/OptionsGUI.cs +++ b/DangerousD/GameCore/GUI/OptionsGUI.cs @@ -13,8 +13,9 @@ namespace DangerousD.GameCore.GUI int selectedGUI = 0; protected override void CreateUI() { - int wigth = AppManager.Instance.inGameResolution.X; - int height = AppManager.Instance.inGameResolution.Y; + int wigth = AppManager.Instance.inGameHUDHelperResolution.X; + int height = AppManager.Instance.inGameHUDHelperResolution.Y; + float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "optionsBackground" }; Elements.Add(menuBackground); menuBackground.LoadTexture(AppManager.Instance.Content); @@ -27,6 +28,8 @@ namespace DangerousD.GameCore.GUI indentation = 5, textureName = "sliderBackground" }; + Elements.Add(slider); + //AppManager.Instance.SettingsManager.SetMainVolume(slider.GetSliderValue); var cB = new CheckBox(Manager); cB.rectangle = new Rectangle(wigth / 2 + 440, 405, (int)(40 * 2.4), (int)(40 * 2.4)); @@ -35,26 +38,28 @@ namespace DangerousD.GameCore.GUI SettingsManager sM = new SettingsManager(); }; cB.LoadTexture(AppManager.Instance.Content); + Elements.Add(cB); var checkBox = new CheckBox(Manager); checkBox.rectangle = new Rectangle(wigth / 2 + 360, 540, (int)(40 * 2.4), (int)(40 * 2.4)); checkBox.Checked += (newCheckState) => { - SettingsManager sM = new SettingsManager(); + AppManager.Instance.SettingsManager.SetIsFullScreen(newCheckState); }; checkBox.LoadTexture(AppManager.Instance.Content); + Elements.Add(checkBox); Label lblOptions = new Label(Manager) { fontName = "buttonFont", scale = 1.2f, text = "Options", fontColor = Color.White, rectangle = new Rectangle((wigth - 50) / 2, 40, 50, 50), mainColor = Color.Transparent }; Elements.Add(lblOptions); Label lblValue = new Label(Manager) - { fontName = "buttonFont", scale = 1f, text = "Volume", fontColor = Color.White, rectangle = new Rectangle((wigth - 50) / 2, 250, 50, 50), mainColor = Color.Transparent }; + { fontName = "buttonFont", scale = 1f , text = "Volume", fontColor = Color.White, rectangle = new Rectangle((wigth - 50) / 2, 250, 50, 50), mainColor = Color.Transparent }; Elements.Add(lblValue); Label lblIsFullScreen = new Label(Manager) - { fontName = "buttonFont", scale = 1f, text = "Full Screen", fontColor = Color.White, rectangle = new Rectangle((wigth - 50) / 2, 580, 50, 50), mainColor = Color.Transparent }; - Elements.Add(lblOptions); + { fontName = "buttonFont", scale = 1f , text = "Full Screen", fontColor = Color.White, rectangle = new Rectangle((wigth - 50) / 2, 580, 50, 50), mainColor = Color.Transparent }; + Elements.Add(lblIsFullScreen); Label lblSwitchMode = new Label(Manager) { fontName = "buttonFont", scale = 1f, text = "Left/Right Mode", fontColor = Color.White, rectangle = new Rectangle((wigth - 50) / 2, 415, 50, 50), mainColor = Color.Transparent }; @@ -67,6 +72,18 @@ namespace DangerousD.GameCore.GUI { AppManager.Instance.ChangeGameState(GameState.Menu); }; + + foreach (var item in Elements) + { + item.rectangle.X = (int)(scaler * item.rectangle.X); + item.rectangle.Y = (int)(scaler * item.rectangle.Y); + item.rectangle.Width = (int)(scaler * item.rectangle.Width); + item.rectangle.Height = (int)(scaler * item.rectangle.Height); + if (item is DrawableTextedUiElement) + { + (item as DrawableTextedUiElement).scale *= scaler; + } + } } public override void Update(GameTime gameTime) { diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 84d6b07..b4b3872 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -27,8 +27,9 @@ namespace DangerousD.GameCore private SpriteBatch _spriteBatch; public GameState gameState { get; private set; } public MultiPlayerStatus multiPlayerStatus { get; private set; } = MultiPlayerStatus.SinglePlayer; - public Point resolution = new Point(1920, 1080); + public Point resolution; public Point inGameResolution = new Point(1920, 1080); + public Point inGameHUDHelperResolution = new Point(1920, 1080); IDrawableObject MenuGUI; IDrawableObject OptionsGUI; IDrawableObject LoginGUI; @@ -60,9 +61,7 @@ namespace DangerousD.GameCore NetworkManager.GetReceivingMessages += NetworkSync; resolution = SettingsManager.Resolution; - _graphics.PreferredBackBufferWidth = resolution.X; - _graphics.PreferredBackBufferHeight = resolution.Y; - _graphics.IsFullScreen = false; + gameState = GameState.Menu; MenuGUI = new MenuGUI(); LoginGUI = new LoginGUI(); @@ -71,8 +70,8 @@ namespace DangerousD.GameCore DeathGUI = new DeathGUI(); HUD = new HUD(); DebugHUD = new DebugHUD(); - UIManager.resolution = resolution; - UIManager.resolutionInGame = inGameResolution; + UIManager.resolution = new Point(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight); + UIManager.resolutionInGame = resolution; } protected override void Initialize() @@ -103,7 +102,7 @@ namespace DangerousD.GameCore GameObject.debugTexture.SetData(new Color[] { new Color(1, 0,0,0.25f) }); SoundManager.LoadSounds(); SoundManager.StartAmbientSound("DoomTestSong"); - renderTarget = new RenderTarget2D(GraphicsDevice, inGameResolution.X, inGameResolution.Y); + renderTarget = new RenderTarget2D(GraphicsDevice, resolution.X, resolution.Y); } protected override void Update(GameTime gameTime) @@ -253,5 +252,24 @@ namespace DangerousD.GameCore { this.multiPlayerStatus = multiPlayerStatus; } + public void SetIsFullScreen(bool fullscrin) + { + DebugHUD?.Set("resX:", SettingsManager.Resolution.X.ToString()); + DebugHUD?.Set("resY:", SettingsManager.Resolution.Y.ToString()); + DebugHUD?.Set("FullScreen:", _graphics.IsFullScreen.ToString()); + if (fullscrin) + { + _graphics.PreferredBackBufferWidth = 1920; + _graphics.PreferredBackBufferHeight = 1080; + } + else + { + _graphics.PreferredBackBufferWidth = SettingsManager.Resolution.X; + _graphics.PreferredBackBufferHeight = SettingsManager.Resolution.Y; + } + UIManager.resolution = new Point(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight); + _graphics.IsFullScreen = fullscrin; + _graphics.ApplyChanges(); + } } } diff --git a/DangerousD/GameCore/Managers/SettingsManager.cs b/DangerousD/GameCore/Managers/SettingsManager.cs index 7a55447..b781ef1 100644 --- a/DangerousD/GameCore/Managers/SettingsManager.cs +++ b/DangerousD/GameCore/Managers/SettingsManager.cs @@ -27,22 +27,26 @@ namespace DangerousD.GameCore.Managers public void SetMainVolume(float volume) { settingsContainer.MainVolume = MainVolume; - ///AppManager.Instance.SoundManager. + //AppManager.Instance.SoundManager. } public void SetMusicVolume(float volume) { settingsContainer.MusicVolume = MainVolume; + SaveSettings(); } public void SetSoundEffectsVolume(float volume) { settingsContainer.SoundEffectsVolume = MainVolume; + SaveSettings(); } public void SetIsFullScreen(bool isFullScreen) { settingsContainer.IsFullScreen = isFullScreen; + AppManager.Instance.SetIsFullScreen(isFullScreen); + SaveSettings(); } public void LoadSettings() { From 6d1f7f750a779b586326b641cb59180a0142f963 Mon Sep 17 00:00:00 2001 From: polten0 Date: Fri, 18 Aug 2023 04:18:52 +0300 Subject: [PATCH 4/9] AnotherTryFix --- DangerousD/GameCore/GUI/AbstractGui.cs | 44 ++++++++++++++++++++++++-- DangerousD/GameCore/GUI/LoginGUI.cs | 31 +++++++++++------- MonogameLibrary/UI/Elements/TextBox.cs | 6 +++- 3 files changed, 65 insertions(+), 16 deletions(-) diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs index 34bea14..9b08d60 100644 --- a/DangerousD/GameCore/GUI/AbstractGui.cs +++ b/DangerousD/GameCore/GUI/AbstractGui.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -17,6 +18,7 @@ public abstract class AbstractGui : IDrawableObject protected List Elements = new(); private List ActiveElements; protected DrawableUIElement SelectedElement; + private bool isStartedPrint = false; private bool isPressed = false; public AbstractGui() @@ -65,11 +67,31 @@ public abstract class AbstractGui : IDrawableObject KeyboardState keyBoardState = Keyboard.GetState(); KeyBoardInput(keyBoardState); } + } Manager.Update(); - (SelectedElement as Button).hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering; + if (SelectedElement is not null) + { + if (SelectedElement is Button) + { + (SelectedElement as Button).hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering; + } + if (SelectedElement is ButtonText) + { + (SelectedElement as ButtonText).hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering; + } + if (SelectedElement is TextBox) + { + TextBox box = (TextBox)SelectedElement; + box.hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering; + if (isStartedPrint) + { + box.SelectIt(); + } + } + } } public virtual void Draw(SpriteBatch spriteBatch) @@ -92,11 +114,16 @@ public abstract class AbstractGui : IDrawableObject else if (gamePadState.Buttons.A == ButtonState.Pressed && !isPressed) { isPressed = true; - if (SelectedElement is ButtonText) + if (SelectedElement is Button) { - Button button = SelectedElement as ButtonText; + Button button = SelectedElement as Button; button.CallLeftBtnEvent(); } + else if (SelectedElement is TextBox) + { + TextBox textBox = SelectedElement as TextBox; + isStartedPrint = true; + } } else if (isPressed && (gamePadState.Buttons.A == ButtonState.Released && gamePadState.DPad.Down == ButtonState.Released && @@ -110,11 +137,13 @@ public abstract class AbstractGui : IDrawableObject if (keyboardState.IsKeyDown(Keys.Up) && !isPressed) { isPressed = true; + isStartedPrint = false; ChangeSelectedElement(-1); } else if (keyboardState.IsKeyDown(Keys.Down) && !isPressed) { isPressed = true; + isStartedPrint = false; ChangeSelectedElement(1); } else if (keyboardState.IsKeyDown(Keys.Enter) && !isPressed) @@ -125,6 +154,11 @@ public abstract class AbstractGui : IDrawableObject Button button = SelectedElement as Button; button.CallLeftBtnEvent(); } + else if (SelectedElement is TextBox) + { + TextBox textBox = SelectedElement as TextBox; + isStartedPrint = true; + } } else if (isPressed && (keyboardState.IsKeyUp(Keys.Enter) && keyboardState.IsKeyUp(Keys.Down) && @@ -170,6 +204,10 @@ public abstract class AbstractGui : IDrawableObject { return true; } + else if (element is TextBox) + { + return true; + } else return false; } } \ No newline at end of file diff --git a/DangerousD/GameCore/GUI/LoginGUI.cs b/DangerousD/GameCore/GUI/LoginGUI.cs index 37a62eb..45a6de8 100644 --- a/DangerousD/GameCore/GUI/LoginGUI.cs +++ b/DangerousD/GameCore/GUI/LoginGUI.cs @@ -40,6 +40,20 @@ namespace DangerousD.GameCore.GUI fontName = "ButtonFont" }); + Button backButton = new Button(Manager) + { + rectangle = new Rectangle(screenWidth / 20, screenHeight / 15, (int)(40 * 2.4), (int)(40 * 2.4)), + text = "<-", + scale = 0.72f, + fontColor = Color.Black, + fontName = "font2", + textureName = "textboxbackground1-1" + }; + backButton.LeftButtonPressed += () => { + AppManager.Instance.ChangeGameState(GameState.Menu); + }; + Elements.Add(backButton); + // TextBox-ы { TextBox loginTextBox = new TextBox(Manager) @@ -67,6 +81,7 @@ namespace DangerousD.GameCore.GUI loginTextBox.fontColor = Color.Gray; } }; + Elements.Add(loginTextBox); TextBox passwordTextBox = new TextBox(Manager) { @@ -92,6 +107,7 @@ namespace DangerousD.GameCore.GUI passwordTextBox.fontColor = Color.Gray; } }; + Elements.Add(passwordTextBox); } // Кнопки @@ -110,6 +126,7 @@ namespace DangerousD.GameCore.GUI AppManager.Instance.ChangeGameState(GameState.Lobby); } }; + Elements.Add(logButton); Button regButton = new Button(Manager) { @@ -121,19 +138,9 @@ namespace DangerousD.GameCore.GUI textureName = "textboxbackground2-1" }; regButton.LeftButtonPressed += GoToRegWebServer; + Elements.Add(regButton); + - Button backButton = new Button(Manager) - { - rectangle = new Rectangle(screenWidth / 20, screenHeight / 15, (int)(40 * 2.4), (int)(40 * 2.4)), - text = "<-", - scale = 0.72f, - fontColor = Color.Black, - fontName = "font2", - textureName = "textboxbackground1-1" - }; - backButton.LeftButtonPressed += () => { - AppManager.Instance.ChangeGameState(GameState.Menu); - }; } } diff --git a/MonogameLibrary/UI/Elements/TextBox.cs b/MonogameLibrary/UI/Elements/TextBox.cs index 3649692..87534eb 100644 --- a/MonogameLibrary/UI/Elements/TextBox.cs +++ b/MonogameLibrary/UI/Elements/TextBox.cs @@ -26,9 +26,13 @@ namespace MonogameLibrary.UI.Elements public event OnTextChange? StopChanging; public event OnTextChange? OnEnter; - protected HoverState hoverState = HoverState.None; + public HoverState hoverState = HoverState.None; protected IsSelected isSelected = IsSelected.NotSelected; public bool shouldEndOnEnter; + public void SelectIt() + { + isSelected = IsSelected.Selected; + } public virtual bool InteractUpdate(MouseState mouseState, MouseState prevmouseState) { From 488a0074f4d7c9c260dd0496efe18fbd17cfeb4c Mon Sep 17 00:00:00 2001 From: gravity Date: Fri, 18 Aug 2023 12:39:06 +0300 Subject: [PATCH 5/9] HUD --- DangerousD/Content/Content.mgcb | 7 ++ DangerousD/Content/PixelFont.spritefont | 64 ++++++++++++++++++ DangerousD/Content/PublicPixel-z84yD.ttf | Bin 0 -> 97456 bytes DangerousD/GameCore/GUI/DeathGUI.cs | 4 +- DangerousD/GameCore/GUI/HUD.cs | 73 ++++++++++++++++----- DangerousD/GameCore/GUI/MenuGUI.cs | 3 +- DangerousD/GameCore/GUI/OptionsGUI.cs | 12 +++- DangerousD/GameCore/Managers/AppManager.cs | 13 ++-- 8 files changed, 145 insertions(+), 31 deletions(-) create mode 100644 DangerousD/Content/PixelFont.spritefont create mode 100644 DangerousD/Content/PublicPixel-z84yD.ttf diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index 37d9842..0b61b7a 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -187,6 +187,13 @@ /processorParam:TextureFormat=Color /build:PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png +#begin PixelFont.spritefont +/importer:FontDescriptionImporter +/processor:FontDescriptionProcessor +/processorParam:PremultiplyAlpha=True +/processorParam:TextureFormat=Compressed +/build:PixelFont.spritefont + #begin playerAnimation.png /importer:TextureImporter /processor:TextureProcessor diff --git a/DangerousD/Content/PixelFont.spritefont b/DangerousD/Content/PixelFont.spritefont new file mode 100644 index 0000000..2ee98cd --- /dev/null +++ b/DangerousD/Content/PixelFont.spritefont @@ -0,0 +1,64 @@ + + + + + + + PublicPixel-z84yD.ttf + + + 12 + + + 0 + + + true + + + + + + + + + + + + ~ + + + а + я + + + + diff --git a/DangerousD/Content/PublicPixel-z84yD.ttf b/DangerousD/Content/PublicPixel-z84yD.ttf new file mode 100644 index 0000000000000000000000000000000000000000..618e5bb88efc72572877cd6a99cb2cdf06741de5 GIT binary patch literal 97456 zcmc${37}om^~b-@IqzjMk*T--{pHDB$GHhcmD(TXbXMVOU}7XR~>o6oReC6-uO}oy{`*l z*v-exIrXHlVQA-bjziyL=AU`=|Gl}eDTEz22}$cs^NyM`w{6r_Yw+2RfotWYxkA8k-@h(i&E!8#I+o3bG+3EVvLuhOW$u*&oof{iRf^wv{ z*^S}ov|q12=^8yEzNMkh*U}L9^KHhAwzgzkXj`?a7+r&)1up8$I%(Q~;Gg?7I{pv0 z&TjjcXSG)zao}5mApFIrdg-d_UU6Izkv{h=Z{wl$%=h!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I>*t#uS_RK`E1z52jlI^W`3OdX&5<=&{OBZ`ZgW)4c!$mQ@d-6M$E+FG zZ&N$0(ZSA?&g@Ked9X8KdlLq8qNRhAQ);FJy4?_>vF+;6wn0v7)Y4#U)CLW$W?Rs^ zo?^Fq&h~88^6Y}vgwi$RM3A;{)O2QHB??=O_D+(}9yby!cY*Z|FZ%Popu=#DeN!0z P*T49z0v0{r8p3}AhSeWV literal 0 HcmV?d00001 diff --git a/DangerousD/GameCore/GUI/DeathGUI.cs b/DangerousD/GameCore/GUI/DeathGUI.cs index c19f9b5..bb91470 100644 --- a/DangerousD/GameCore/GUI/DeathGUI.cs +++ b/DangerousD/GameCore/GUI/DeathGUI.cs @@ -17,8 +17,8 @@ internal class DeathGUI : AbstractGui var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "deathBackground" }; Elements.Add(menuBackground); menuBackground.LoadTexture(AppManager.Instance.Content); - Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2, (height - 50) / 2 - 80, 50, 50), text = "You death", mainColor = Color.Transparent, scale = 0.7f, fontName = "ButtonFont", fontColor = Color.White }); - Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2, (height - 50) / 2, 50, 50), text = $"Score = {0}", mainColor = Color.Transparent, scale = 0.7f, fontName = "ButtonFont", fontColor = Color.White }); + Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2, (height - 50) / 2 - 80, 50, 50), text = "You died", mainColor = Color.Transparent, scale = 0.7f, fontName = "ButtonFont", fontColor = Color.White }); + Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2, (height - 50) / 2, 50, 50), text = $"Score: {0}", mainColor = Color.Transparent, scale = 0.7f, fontName = "ButtonFont", fontColor = Color.White }); var butMenu = new ButtonText(Manager) { rectangle = new Rectangle((wigth - 300) / 2, (height - 50) / 2 + 80, 300, 50), text = "Back to menu", scale = 0.7f, fontName = "ButtonFont" }; Elements.Add(butMenu); butMenu.LeftButtonPressed += () => diff --git a/DangerousD/GameCore/GUI/HUD.cs b/DangerousD/GameCore/GUI/HUD.cs index 07e446a..a9507de 100644 --- a/DangerousD/GameCore/GUI/HUD.cs +++ b/DangerousD/GameCore/GUI/HUD.cs @@ -6,36 +6,73 @@ using System.Xml.Linq; using DangerousD.GameCore.Managers; using DangerousD.GameCore; using System.Collections.Generic; +using Microsoft.Xna.Framework.Graphics; +using static System.Formats.Asn1.AsnWriter; +using static System.Net.Mime.MediaTypeNames; namespace DangerousD.GameCore.GUI { - public class HUD : AbstractGui + public class HUD : IDrawableObject { - int ammout = 0; - List rects = new List { }; + public int ammout = 8; int wigth = AppManager.Instance.inGameResolution.X; int height = AppManager.Instance.inGameResolution.Y; - protected override void CreateUI() - { - DrawableUIElement background = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), mainColor = Color.Transparent }; - Elements.Add(background); - Rect rect = new Rect(Manager) { rectangle = new Rectangle(wigth / 35, height / 35, 120, 70), mainColor = Color.DarkRed }; - 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); + float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; + Texture2D texture; + SpriteFont spriteFont; - } - public override void Update(GameTime gameTime) + public void Draw(SpriteBatch spriteBatch) { - - rects.Clear(); + spriteBatch.Begin(); + spriteBatch.Draw(texture, new Rectangle(wigth / 35 - 2, height / 35 - 2, 120 + 2, 70 + 2), Color.DarkRed); + spriteBatch.DrawString(spriteFont, "AMMO", new Vector2(wigth / 34 + 4, height / 30 - 6), Color.Gray, 0, Vector2.Zero, 1.8f, SpriteEffects.None, 0); + spriteBatch.DrawString(spriteFont, "AMMO", new Vector2(wigth / 34 + 1, height / 30 - 6), Color.White, 0, Vector2.Zero, 1.8f, SpriteEffects.None, 0); for (int i = 0; i < ammout; i++) { - 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); + spriteBatch.Draw(texture, new Rectangle(wigth / 30 + i * 13, height / 17 + 4, 5, 20), Color.Yellow); } - base.Update(gameTime); + spriteBatch.End(); + } + + public void Initialize() + { + } + + public void LoadContent() + { + texture = new Texture2D(AppManager.Instance.GraphicsDevice, 1, 1); + texture.SetData(new Color[] { Color.White }); + spriteFont = AppManager.Instance.Content.Load("PixelFont"); + } + + public void Update(GameTime gameTime) + { } } + //public class HUD1 : AbstractGui + //{ + // + // protected override void CreateUI() + // { + // DrawableUIElement background = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), mainColor = Color.Transparent }; + // Elements.Add(background); + // Rect rect = new Rect(Manager) { rectangle = new Rectangle(wigth / 35, height / 35, 120, 70), mainColor = Color.DarkRed }; + // 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); + + // } + // public override void Update(GameTime gameTime) + // { + // + // rects.Clear(); + // for (int i = 0; i < ammout; i++) + // { + // 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); + // } + // base.Update(gameTime); + // } + //} } diff --git a/DangerousD/GameCore/GUI/MenuGUI.cs b/DangerousD/GameCore/GUI/MenuGUI.cs index d6e376e..5f23b10 100644 --- a/DangerousD/GameCore/GUI/MenuGUI.cs +++ b/DangerousD/GameCore/GUI/MenuGUI.cs @@ -38,6 +38,7 @@ internal class MenuGUI : AbstractGui { AppManager.Instance.ChangeGameState(GameState.Game); AppManager.Instance.SetMultiplayerState(MultiPlayerStatus.SinglePlayer); + }; var butMulti = new ButtonText(Manager) { rectangle = new Rectangle((wigth - (int)(300 * 2.4)) / 2, 470, (int)(300 * 2.4), (int)(50 * 2.4)), text = "Multiplayer", scale = 1.2f, fontName = "ButtonFont" }; @@ -45,7 +46,7 @@ internal class MenuGUI : AbstractGui Elements.Add(butMulti); butMulti.LeftButtonPressed += () => { - AppManager.Instance.ChangeGameState(GameState.Login); + AppManager.Instance.ChangeGameState(GameState.Login); }; var butOption = new ButtonText(Manager) { rectangle = new Rectangle((wigth - (int)(160 * 2.4)) / 2, 590, (int)(160 * 2.4), (int)(50 * 2.4)), text = "Option", scale = 1.2f, fontName = "ButtonFont" }; Elements.Add(butOption); diff --git a/DangerousD/GameCore/GUI/OptionsGUI.cs b/DangerousD/GameCore/GUI/OptionsGUI.cs index c879731..18ccd77 100644 --- a/DangerousD/GameCore/GUI/OptionsGUI.cs +++ b/DangerousD/GameCore/GUI/OptionsGUI.cs @@ -17,7 +17,7 @@ namespace DangerousD.GameCore.GUI int height = AppManager.Instance.inGameHUDHelperResolution.Y; float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y; var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "optionsBackground" }; - Elements.Add(menuBackground); + //Elements.Add(menuBackground); menuBackground.LoadTexture(AppManager.Instance.Content); var slider = new Slider(Manager) @@ -28,7 +28,7 @@ namespace DangerousD.GameCore.GUI indentation = 5, textureName = "sliderBackground" }; - Elements.Add(slider); + //Elements.Add(slider); //AppManager.Instance.SettingsManager.SetMainVolume(slider.GetSliderValue); var cB = new CheckBox(Manager); @@ -84,6 +84,14 @@ namespace DangerousD.GameCore.GUI (item as DrawableTextedUiElement).scale *= scaler; } } + slider.rectangle.X = (int)(scaler * slider.rectangle.X); + slider.rectangle.Y = (int)(scaler * slider.rectangle.Y); + //slider.rectangle.Width = (int)(scaler * slider.rectangle.Width); + //slider.rectangle.Height = (int)(scaler * slider.rectangle.Height); + if (slider is DrawableTextedUiElement) + { + (slider as DrawableTextedUiElement).scale *= scaler; + } } public override void Update(GameTime gameTime) { diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index b4b3872..6a6d9a5 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -16,7 +16,7 @@ using DangerousD.GameCore.GameObjects; namespace DangerousD.GameCore { public enum MultiPlayerStatus { SinglePlayer, Host, Client } - public enum GameState { Menu, Options, Lobby, Game, Login, Death, HUD, + public enum GameState { Menu, Options, Lobby, Game, Login, Death, GameOver } public class AppManager : Game @@ -35,8 +35,9 @@ namespace DangerousD.GameCore IDrawableObject LoginGUI; IDrawableObject LobbyGUI; IDrawableObject DeathGUI; - IDrawableObject HUD; + //IDrawableObject HUD; public DebugHUD DebugHUD; + public HUD HUD; public List NetworkTasks = new List(); public GameManager GameManager { get; private set; } = new(); @@ -130,9 +131,6 @@ namespace DangerousD.GameCore case GameState.Death: DeathGUI.Update(gameTime); break; - case GameState.HUD: - HUD.Update(gameTime); - break; case GameState.Game: GameManager.Update(gameTime); break; @@ -140,6 +138,7 @@ namespace DangerousD.GameCore break; } DebugHUD.Update(gameTime); + HUD.Update(gameTime); base.Update(gameTime); } @@ -166,9 +165,6 @@ namespace DangerousD.GameCore case GameState.Death: DeathGUI.Draw(_spriteBatch); break; - case GameState.HUD: - HUD.Draw(_spriteBatch); - break; case GameState.Game: _spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp); GameManager.Draw(_spriteBatch); @@ -184,6 +180,7 @@ namespace DangerousD.GameCore DebugHUD.Draw(_spriteBatch); + HUD.Draw(_spriteBatch); base.Draw(gameTime); } From c0997c903cb25c88cde0b6d3816338181faf762a Mon Sep 17 00:00:00 2001 From: AnloGames <7383an@gmail.com> Date: Fri, 18 Aug 2023 13:35:16 +0300 Subject: [PATCH 6/9] =?UTF-8?q?LivingEntitySendPositionSupport(=D0=97?= =?UTF-8?q?=D0=9E=D0=9C=D0=91=D0=98=20=D0=A5=D0=9E=D0=94=D0=AF=D0=A2!!!)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameObjects/LivingEntities/Player/Player.cs | 5 ----- DangerousD/GameCore/GameObjects/LivingEntity.cs | 12 +++++++++++- DangerousD/GameCore/Graphics/GraphicsComponent.cs | 14 ++++++++------ DangerousD/GameCore/Managers/AppManager.cs | 5 ----- DangerousD/GameCore/Managers/GameManager.cs | 1 - 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index eaae151..4343570 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -247,11 +247,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } } } - if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer) - { - NetworkTask task = new NetworkTask(id, Pos); - AppManager.Instance.NetworkTasks.Add(task); - } } public void MoveDown() { diff --git a/DangerousD/GameCore/GameObjects/LivingEntity.cs b/DangerousD/GameCore/GameObjects/LivingEntity.cs index d311095..78ea17c 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntity.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntity.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework; +using DangerousD.GameCore.GameObjects.LivingEntities; +using DangerousD.GameCore.Network; +using Microsoft.Xna.Framework; namespace DangerousD.GameCore.GameObjects; @@ -15,6 +17,14 @@ public abstract class LivingEntity : Entity public override void SetPosition(Vector2 position) { _pos = position; + if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer) + { + NetworkTask task = new NetworkTask(id, _pos); + if (this is Player || AppManager.Instance.multiPlayerStatus == MultiPlayerStatus.Host) + { + AppManager.Instance.NetworkTasks.Add(task); + } + } } //TODO befrend targetpos and physics engine diff --git a/DangerousD/GameCore/Graphics/GraphicsComponent.cs b/DangerousD/GameCore/Graphics/GraphicsComponent.cs index 27eeea8..1ac6aa8 100644 --- a/DangerousD/GameCore/Graphics/GraphicsComponent.cs +++ b/DangerousD/GameCore/Graphics/GraphicsComponent.cs @@ -1,4 +1,6 @@ -using DangerousD.GameCore.Managers; +using DangerousD.GameCore.GameObjects; +using DangerousD.GameCore.GameObjects.LivingEntities; +using DangerousD.GameCore.Managers; using DangerousD.GameCore.Network; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; @@ -107,13 +109,13 @@ namespace DangerousD.GameCore.Graphics public void StartAnimation(string startedanimationId) { - if (startedanimationId == "playerShootRight" && parentId == 17) - { - string a = "2"; - } - if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer && startedanimationId != GetCurrentAnimation) + if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer) { + LivingEntity entity = AppManager.Instance.GameManager.livingEntities.Find(x => x.id == parentId); + if (((entity is Player) || AppManager.Instance.multiPlayerStatus == MultiPlayerStatus.Host) && startedanimationId != GetCurrentAnimation) + { AppManager.Instance.NetworkTasks.Add(new NetworkTask(parentId, startedanimationId, Vector2.Zero)); + } } currentFrame = 0; currentAnimation = animations.Find(x => x.Id == startedanimationId); diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 3ad6cc3..5a2cf29 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -242,11 +242,6 @@ namespace DangerousD.GameCore case NetworkTaskOperationEnum.ChangeState: if (networkTask.objId != GameManager.GetPlayer1.id) { - List gcs = new List(); - foreach (var player in GameManager.players) - { - gcs.Add(player.GetGraphicsComponent()); - } LivingEntity entity = GameManager.livingEntities.Find(x => x.id == networkTask.objId); if (entity != null) { diff --git a/DangerousD/GameCore/Managers/GameManager.cs b/DangerousD/GameCore/Managers/GameManager.cs index ae7bf59..8d1c7c4 100644 --- a/DangerousD/GameCore/Managers/GameManager.cs +++ b/DangerousD/GameCore/Managers/GameManager.cs @@ -149,7 +149,6 @@ namespace DangerousD.GameCore } } else - { for (int i = 0; i < livingEntitiesWithoutPlayers.Count; i++) { From 5bd2b7d93ba018cbf3e840af115c05fbf7090c57 Mon Sep 17 00:00:00 2001 From: bmvolf Date: Fri, 18 Aug 2023 13:53:18 +0300 Subject: [PATCH 7/9] started vertical shoot --- .../Content/animations/playerShootUpLeft | 1 + .../Content/animations/playerShootUpRight | 1 + .../LivingEntities/Monsters/Zombie.cs | 7 +-- .../LivingEntities/Player/Player.cs | 48 +++++++++++++++---- 4 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 DangerousD/Content/animations/playerShootUpLeft create mode 100644 DangerousD/Content/animations/playerShootUpRight diff --git a/DangerousD/Content/animations/playerShootUpLeft b/DangerousD/Content/animations/playerShootUpLeft new file mode 100644 index 0000000..ac72a72 --- /dev/null +++ b/DangerousD/Content/animations/playerShootUpLeft @@ -0,0 +1 @@ +{"id":"playerShootUpLeft","textureName":"playerAnimation","startSpriteRectangle":{"X":267,"Y":34,"Width":24,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":1,"isCycle":true,"offset":"0, 0"} diff --git a/DangerousD/Content/animations/playerShootUpRight b/DangerousD/Content/animations/playerShootUpRight new file mode 100644 index 0000000..5bdb07a --- /dev/null +++ b/DangerousD/Content/animations/playerShootUpRight @@ -0,0 +1 @@ +{"id":"playerShootUpRight","textureName":"playerAnimation","startSpriteRectangle":{"X":267,"Y":1,"Width":24,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":1,"isCycle":true,"offset":"0, 0"} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs index c1737f2..90fdfc2 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using DangerousD.GameCore.Managers; +using DangerousD.GameCore.GameObjects; namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { @@ -24,7 +25,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { Width = 24; Height = 40; - monster_speed = 3; + monster_speed = 2; name = "Zombie"; monster_health = 2; leftBorder = (int)position.X - 100; @@ -133,7 +134,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters public void Target() { - if (AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 50, (int)Pos.Y, Width + 100, Height), typeof(Player)).Count > 0) + if (AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 50, (int)Pos.Y, Width + 200, Height), typeof(Player)).Count > 0) { if(isGoRight && this._pos.X <= AppManager.Instance.GameManager.players[0].Pos.X) { @@ -183,5 +184,5 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters Death(); } } + } } -} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index b8e68ba..8b14436 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -32,7 +32,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities public bool isUping = false; private int shootLength = 160; - + public int Bullets { get { return bullets; } } @@ -49,7 +49,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities AppManager.Instance.InputManager.MovEventDown += MoveDown; } - velocity = new Vector2(0, 0); + velocity = new Vector2(0, 0); rightBorder = (int)position.X + 100; leftBorder = (int)position.X - 100; bullets = 5; @@ -70,7 +70,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities public bool IsAlive { get { return isAlive; } } protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "playerMoveLeft", "playerMoveRight", "DeathFromZombie", "playerRightStay", "playerStayLeft", - "playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload", "smokeAfterShoot"}, "playerReload"); + "playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload", "smokeAfterShoot", "playerShootUpRight", "playerShootUpLeft"}, "playerReload"); public void Attack() { @@ -98,7 +98,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities return; } isAttacked = true; - if(monsterName == "Zombie") + if (monsterName == "Zombie") { AnimationRectangle deathRectangle = new AnimationRectangle(Pos, "DeathFrom" + monsterName); deathRectangle.Gr.actionOfAnimationEnd += (a) => @@ -109,7 +109,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } }; } - else if(monsterName == "Spider") + else if (monsterName == "Spider") { AnimationRectangle deathRectangle = new AnimationRectangle(Pos, "DeathFrom" + monsterName); deathRectangle.Gr.actionOfAnimationEnd += (a) => @@ -144,7 +144,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { StartCicycleAnimation("playerShootRight"); var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared()); - if (targets != null) + if (targets.Count() > 0) { Zombie targetZombie = (Zombie)targets.First(); targetZombie.TakeDamage(); @@ -184,7 +184,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities FallingThroughPlatform = false; } GraphicsComponent.SetCameraPosition(Pos); - if (!isAttacked || AppManager.Instance.InputManager.InvincibilityCheat) + if (!isAttacked || AppManager.Instance.InputManager.InvincibilityCheat) { if (!isShooting) { @@ -227,7 +227,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } else if (AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит { - if(bullets < 5) + if (bullets < 5) { if (GraphicsComponent.GetCurrentAnimation != "playerReload") { @@ -236,11 +236,31 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } else if (isRight) { - GraphicsComponent.StartAnimation("playerRightStay"); + if (isUping) + { + if (GraphicsComponent.GetCurrentAnimation != "playerShootUpRight") + { + GraphicsComponent.StartAnimation("playerShootUpRight"); + } + } + else + { + GraphicsComponent.StartAnimation("playerRightStay"); + } } else if (!isRight) { - GraphicsComponent.StartAnimation("playerStayLeft"); + if (isUping) + { + if (GraphicsComponent.GetCurrentAnimation != "playerShootUpLeft") + { + GraphicsComponent.StartAnimation("playerShootUpLeft"); + } + } + else + { + GraphicsComponent.StartAnimation("playerStayLeft"); + } } } } @@ -256,5 +276,13 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities isOnGround = false; } + public class Bullet : GameObjects.LivingEntity + { + public Bullet(Vector2 position) : base(position) + { + } + protected override GraphicsComponent GraphicsComponent { get; } = new("ZombieMoveLeft"); + + } } } From 41d616d7f5c71e0d15c076b337afb6b2a1b81316 Mon Sep 17 00:00:00 2001 From: AnloGames <7383an@gmail.com> Date: Fri, 18 Aug 2023 14:36:57 +0300 Subject: [PATCH 8/9] map to lvl --- DangerousD/GameCore/Managers/AppManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 0941181..ab1b173 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -205,7 +205,7 @@ namespace DangerousD.GameCore break; case GameState.Game: - GameManager.mapManager.LoadLevel("map"); + GameManager.mapManager.LoadLevel("lvl"); GameManager.FindBorders(); From 93e948ac426ee425d0622f0bce6cf298c9ab109d Mon Sep 17 00:00:00 2001 From: bmvolf Date: Fri, 18 Aug 2023 14:00:22 +0300 Subject: [PATCH 9/9] fixed hud --- DangerousD/GameCore/GUI/HUD.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DangerousD/GameCore/GUI/HUD.cs b/DangerousD/GameCore/GUI/HUD.cs index 10a7fc0..0e24ff6 100644 --- a/DangerousD/GameCore/GUI/HUD.cs +++ b/DangerousD/GameCore/GUI/HUD.cs @@ -26,7 +26,7 @@ namespace DangerousD.GameCore.GUI spriteBatch.Draw(texture, new Rectangle(wigth / 35 - 2, height / 35 - 2, 120 + 2, 70 + 2), Color.DarkRed); spriteBatch.DrawString(spriteFont, "AMMO", new Vector2(wigth / 34 + 4, height / 30 - 6), Color.Gray, 0, Vector2.Zero, 1.8f, SpriteEffects.None, 0); spriteBatch.DrawString(spriteFont, "AMMO", new Vector2(wigth / 34 + 1, height / 30 - 6), Color.White, 0, Vector2.Zero, 1.8f, SpriteEffects.None, 0); - for (int i = 0; i < 5; i++) + for (int i = 1; i < 6; i++) { if (i <= AppManager.Instance.GameManager.players[0].Bullets) {