/// <summary> /// Handle user input during the gamestate where the title is displayed. /// </summary> public static void HandleTitleInput(MouseState mouseState) { /** Mouse handling **/ if (mouseState.LeftButton == ButtonState.Pressed && !MousePressed) { TitleState.CurrentScreen.Click(mouseState.Position); MousePressed = true; } else if (mouseState.LeftButton == ButtonState.Released) { MousePressed = false; } /** Keyboard handling **/ // Back/cancel if (!BackPressed && Keyboard.GetState().IsKeyDown(Keys.Escape)) { BackPressed = true; TitleState.Back(); } else if (Keyboard.GetState().IsKeyUp(Keys.Escape)) { BackPressed = false; } }