diff --git a/source/Infiniminer/Infiniminer.Client.Shared/Engines/InputEngine.cs b/source/Infiniminer/Infiniminer.Client.Shared/Engines/InputEngine.cs index f85b2b0..4604814 100644 --- a/source/Infiniminer/Infiniminer.Client.Shared/Engines/InputEngine.cs +++ b/source/Infiniminer/Infiniminer.Client.Shared/Engines/InputEngine.cs @@ -136,12 +136,11 @@ public class InputEngine public VirtualButton SayToAll { get; private set; } /////////////////////////////////////////////////////////////////////////// - /// Select Button (don't know what else to call this) - /// This is the command that was used by the ESC key to bring up - /// the screen asking if the player wanted to pixelcide or quite - /// This is only available for keyboards + /// Show Help Button + /// This is the command that brings up the overlay screen showing the + /// help information and keyboard/controller bindings /////////////////////////////////////////////////////////////////////////// - public VirtualButton SelectButton { get; private set; } + public VirtualButton ShowHelpButton { get; private set; } /////////////////////////////////////////////////////////////////////////// /// Quit Button @@ -294,11 +293,11 @@ public InputEngine() SayToAll.Nodes.Add(new VirtualButton.Keyboard.Key(Keys.Y)); // - // Select Button + // Show Help Button // - SelectButton = new VirtualButton(); - SelectButton.Nodes.Add(new VirtualButton.Keyboard.Key(Keys.Escape)); - SelectButton.Nodes.Add(new VirtualButton.GamePad.Button(Buttons.Back)); + ShowHelpButton = new VirtualButton(); + ShowHelpButton.Nodes.Add(new VirtualButton.Keyboard.Key(Keys.F1)); + ShowHelpButton.Nodes.Add(new VirtualButton.GamePad.Button(Buttons.Back)); // // Quit Button @@ -401,7 +400,7 @@ public void Register() ChangeClass.Register(); SayToTeam.Register(); SayToAll.Register(); - SelectButton.Register(); + ShowHelpButton.Register(); MenuUp.Register(); MenuDown.Register(); MenuLeft.Register(); @@ -429,7 +428,7 @@ public void Unregister() ChangeClass.Unregister(); SayToTeam.Unregister(); SayToAll.Unregister(); - SelectButton.Unregister(); + ShowHelpButton.Unregister(); MenuUp.Unregister(); MenuDown.Unregister(); MenuLeft.Unregister(); diff --git a/source/Infiniminer/Infiniminer.Client.Shared/Engines/InterfaceEngine.cs b/source/Infiniminer/Infiniminer.Client.Shared/Engines/InterfaceEngine.cs index 759ff7a..25d5df6 100644 --- a/source/Infiniminer/Infiniminer.Client.Shared/Engines/InterfaceEngine.cs +++ b/source/Infiniminer/Infiniminer.Client.Shared/Engines/InterfaceEngine.cs @@ -40,7 +40,7 @@ public class InterfaceEngine SpriteFont uiFont, radarFont; Rectangle drawRect; - Texture2D texCrosshairs, texBlank, texHelp; + Texture2D texCrosshairs, texBlank, texHelpKeyboardMouse, texHelpGamePad; Texture2D texRadarBackground, texRadarForeground, texRadarPlayerSame, texRadarPlayerAbove, texRadarPlayerBelow, texRadarPlayerPing, texRadarNorth; Texture2D texToolRadarRed, texToolRadarBlue, texToolRadarGold, texToolRadarDiamond, texToolRadarLED, texToolRadarPointer, texToolRadarFlash; Texture2D texToolDetonatorDownRed, texToolDetonatorUpRed, texToolDetonatorDownBlue, texToolDetonatorUpBlue; @@ -67,7 +67,8 @@ public InterfaceEngine(InfiniminerGame gameInstance) texRadarPlayerBelow = gameInstance.Content.Load("ui/tex_radar_player_below"); texRadarPlayerPing = gameInstance.Content.Load("ui/tex_radar_player_ping"); texRadarNorth = gameInstance.Content.Load("ui/tex_radar_north"); - texHelp = gameInstance.Content.Load("menus/tex_menu_help"); + texHelpKeyboardMouse = gameInstance.Content.Load("menus/tex_menu_help_keyboard_mouse"); + texHelpGamePad = gameInstance.Content.Load("menus/tex_menu_help_gamepad"); texToolRadarRed = gameInstance.Content.Load("tools/tex_tool_radar_red"); texToolRadarBlue = gameInstance.Content.Load("tools/tex_tool_radar_blue"); @@ -401,7 +402,7 @@ public void Render(GraphicsDevice graphicsDevice) spriteBatch.Draw(texRadarForeground, new Vector2(10, 30), Color.White); // Draw escape message. - if (_P.inputEngine.SelectButton.Check()) + if (_P.inputEngine.ShowHelpButton.Check()) { string quitMessage = string.Empty; string pixelcideMessage = string.Empty; @@ -430,7 +431,7 @@ public void Render(GraphicsDevice graphicsDevice) if (_P.screenEffectCounter >= 2) { string deathMessage = string.Empty; - if(_P.inputEngine.ControlType == ControlType.KeyboardMouse) + if (_P.inputEngine.ControlType == ControlType.KeyboardMouse) { deathMessage = "You have died. Left click to respawn."; } @@ -458,10 +459,18 @@ public void Render(GraphicsDevice graphicsDevice) } // Draw the help screen. - if (Keyboard.GetState().IsKeyDown(Keys.F1)) + if (_P.inputEngine.ShowHelpButton.Check()) { spriteBatch.Draw(texBlank, new Rectangle(0, 0, graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height), Color.Black); - spriteBatch.Draw(texHelp, drawRect, Color.White); + + if (_P.inputEngine.ControlType == ControlType.KeyboardMouse) + { + spriteBatch.Draw(texHelpKeyboardMouse, drawRect, Color.White); + } + else + { + spriteBatch.Draw(texHelpGamePad, drawRect, Color.White); + } } spriteBatch.End(); diff --git a/source/Infiniminer/Infiniminer.Client.Shared/States/MainGameState.cs b/source/Infiniminer/Infiniminer.Client.Shared/States/MainGameState.cs index 5236827..87fa7d8 100644 --- a/source/Infiniminer/Infiniminer.Client.Shared/States/MainGameState.cs +++ b/source/Infiniminer/Infiniminer.Client.Shared/States/MainGameState.cs @@ -292,7 +292,7 @@ public override string OnUpdate(GameTime gameTime, KeyboardState keyState, Mouse /////////////////////////////////////////////////////////////////// /// Check if player want to quit match or commit pixelcide /////////////////////////////////////////////////////////////////// - if (_P.inputEngine.SelectButton.Check()) + if (_P.inputEngine.ShowHelpButton.Check()) { if (_P.inputEngine.QuitButton.Pressed()) {