public GameState checkClick(Vector2 tapLocation) { Rectangle tap = new Rectangle((int)tapLocation.X, (int)tapLocation.Y, 1, 1); if (tap.Intersects(mainMenuButton.Bounds)) { return(GameState.MainMenu); } if (tap.Intersects(backButton.Bounds)) { return(GameState.SongLoadMenu); } if (tap.Intersects(nextButton.Bounds)) { DataSaver.SelectedXml(selectedBeatmap); return(GameState.Playing); } if (tap.Intersects(listBackwardButton.Bounds)) { turnPage(-1); } if (tap.Intersects(listForwardButton.Bounds)) { turnPage(1); } foreach (KeyValuePair <String, NavigationButton> kvp in loadSelectionButtonList) { if (tap.Intersects(kvp.Value.Bounds)) { if (selectedNavButton != null) { selectedNavButton.Color = Color.Aqua; } kvp.Value.Color = Color.DarkBlue; selectedNavButton = kvp.Value; selectedBeatmap = kvp.Key; break; } } return(GameState.XMLLoadMenu); }