X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=Project06%2FlobbyTest%2FlobbyTest%2FLobbyGUI.cs;h=046fa7859130f21f4ccadc48dabbe1c58d1796ef;hb=ccab068411b715c44a3e7a6ca165f0f4f05e417b;hp=b1205672cb48b962663afdfee0e15e05b2a85b2e;hpb=356c8e65fc38a3c44c9cee73c38f1bdccef2f30f;p=chaz%2Fcarfire diff --git a/Project06/lobbyTest/lobbyTest/LobbyGUI.cs b/Project06/lobbyTest/lobbyTest/LobbyGUI.cs index b120567..046fa78 100644 --- a/Project06/lobbyTest/lobbyTest/LobbyGUI.cs +++ b/Project06/lobbyTest/lobbyTest/LobbyGUI.cs @@ -14,6 +14,7 @@ namespace lobbyTest Texture2D background; Texture2D spotLight; Texture2D cs; + Texture2D selectGameScreen; Vector2 backgroundPos; Vector2 spotLightPos; @@ -35,6 +36,9 @@ namespace lobbyTest Vector2 findGamePos; string findGameText; + Vector2 returnToMainPos; + string returnToMainText; + KeyboardState previousKeyboardState; KeyboardState currentKeyboardState; @@ -58,6 +62,7 @@ namespace lobbyTest background = contentManager.Load("background"); spotLight = contentManager.Load("spotlight"); cs = contentManager.Load("cs"); + selectGameScreen = contentManager.Load("selectGameScreen"); backgroundPos = new Vector2(0f, 0f); spotLightPos = new Vector2(100f, graphics.GraphicsDevice.Viewport.Height - 98); spotLightCenter = new Vector2(800f, 800f); @@ -79,6 +84,9 @@ namespace lobbyTest findGamePos = new Vector2(100f, (MaxY / 3) + 60); findGameText = "Find Game"; + + returnToMainPos = new Vector2(MaxX / 2, MaxY - 120); + returnToMainText = "press [ X ] to return to main menu"; } public void UnloadContent() @@ -98,14 +106,14 @@ namespace lobbyTest { if (currentKeyboardState.IsKeyDown(Keys.Enter) && previousKeyboardState.IsKeyUp(Keys.Enter)) currentState = lobbyState.CreateGame; - if (currentKeyboardState.IsKeyDown(Keys.Down) || currentKeyboardState.IsKeyDown(Keys.Up)) + if (currentKeyboardState.IsKeyDown(Keys.Down)) selected = findGameText; } else { if (currentKeyboardState.IsKeyDown(Keys.Enter) && previousKeyboardState.IsKeyUp(Keys.Enter)) currentState = lobbyState.FindGame; - if (currentKeyboardState.IsKeyDown(Keys.Down) || currentKeyboardState.IsKeyDown(Keys.Up)) + if (currentKeyboardState.IsKeyDown(Keys.Up)) selected = createGameText; } break; @@ -113,6 +121,8 @@ namespace lobbyTest break; case lobbyState.FindGame: + if (currentKeyboardState.IsKeyDown(Keys.X) && previousKeyboardState.IsKeyUp(Keys.X)) + currentState = lobbyState.Welcome; break; case lobbyState.Connected: @@ -145,11 +155,15 @@ namespace lobbyTest else spriteBatch.DrawString(menuFont, findGameText, findGamePos, Color.Gray, 0, zero, 1f, SpriteEffects.None, 0.5f); break; + case lobbyState.CreateGame: break; case lobbyState.FindGame: - + spriteBatch.Draw(selectGameScreen, backgroundPos, null, Color.White, 0, zero, 0.5f, SpriteEffects.None, 0); + //spriteBatch.DrawString(menuFont, "Select Game", new Vector2(100, 100), Color.Gray, 0, zero, 1f, SpriteEffects.None, 0.5f); + + //spriteBatch.DrawString(menuFont, returnToMainText, returnToMainPos, Color.Gray, 0, new Vector2(180 , 0), .6f, SpriteEffects.None, 0.5f); break; case lobbyState.Connected: