diff --git a/DangerousD/GameCore/GUI/MenuGUI.cs b/DangerousD/GameCore/GUI/MenuGUI.cs index 62ff7c0..d897d93 100644 --- a/DangerousD/GameCore/GUI/MenuGUI.cs +++ b/DangerousD/GameCore/GUI/MenuGUI.cs @@ -15,8 +15,18 @@ internal class MenuGUI : AbstractGui var menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, wigth, height), textureName = "menuFon" }; Elements.Add(menuBackground); menuBackground.LoadTexture(AppManager.Instance.Content); - Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 - 60, 60, 50, 50), text = "Dangerous", mainColor = Color.Transparent, scale = 0.7f, fontName = "Font2", fontColor = Color.White }); - Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 + 250, 90, 50, 50), text = "D", mainColor = Color.Transparent, scale = 1.2f, fontName = "Font2", fontColor = Color.White }); + int TopMenu = 0; + Color[] colors = new Color[] { new Color(64, 53, 51), new Color(84, 58, 52), + new Color(170, 101, 63), new Color(254, 208, 116), new Color(252, 231, 124) }; + for (int i = 0; i < colors.Length; i++) + Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 - 60, 60, 50, 50), text = "Dangerous", mainColor = Color.Transparent, scale = 1-0.05f*i*i/10, fontName = "Font2", fontColor = colors[i] }); + + int dx = 100; + Color[] colors2 = new Color[] { new Color(64, 53, 51), new Color(84, 58, 52), + new Color(170, 101, 63), new Color(254, 208, 116), new Color(252, 231, 124) }; + for (int i = 0; i < colors2.Length; i++) + Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 + 250 + dx-i*i, 90 - i * i/5, 50, 50), text = "D", mainColor = Color.Transparent, scale = 1.3f - 0.05f * i * i / 5, fontName = "Font2", fontColor = colors2[i] }); + var butSingle = new ButtonText(Manager) { rectangle = new Rectangle((wigth - 300) / 2, 130, 300, 50), text = "Singleplayer", fontName = "ButtonFont" }; Elements.Add(butSingle); butSingle.LeftButtonPressed += () => diff --git a/DangerousD/GameCore/InputManager.cs b/DangerousD/GameCore/InputManager.cs index 83e224f..803bd6e 100644 --- a/DangerousD/GameCore/InputManager.cs +++ b/DangerousD/GameCore/InputManager.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; namespace DangerousD.GameCore { public enum ScopeState { Up, Middle, Down } - class InputManager + public class InputManager { public delegate void Delegat(); public event Delegat MovEventJump; diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index f769129..0a59b80 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -27,6 +27,7 @@ namespace DangerousD.GameCore public GameManager GameManager { get; private set; } = new GameManager(); public AnimationBuilder AnimationBuilder { get; private set; } = new AnimationBuilder(); public NetworkManager NetworkManager { get; private set; } = new NetworkManager(); + public InputManager InputManager { get; private set; } = new InputManager(); public AppManager() { Instance = this; @@ -66,6 +67,7 @@ namespace DangerousD.GameCore if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) Exit(); + InputManager.Update(); switch (gameState) { case GameState.Menu: