/// <summary> /// Draws the high scores to the screen. /// </summary> public static void DrawHighScores() { const int SCORES_HEADING = 40; const int SCORES_TOP = 80; const int SCORE_GAP = 30; if (_Scores.Count == 0) { LoadScores(); } SwinGame.DrawText("<- High Scores ->", Color.White, GameResources.GameFont("Courier"), SCORES_LEFT, SCORES_HEADING); MenuController.DrawButtons(MAIN_MENU); // For all of the scores int i; var loopTo = _Scores.Count - 1; for (i = 0; i <= loopTo; i++) { Score s; s = _Scores [i]; // for scores 1 - 9 use 01 - 09 if (i < 9) { SwinGame.DrawText(" " + (i + 1) + ": " + s.Name + " " + s.Value, Color.White, GameResources.GameFont("Courier"), SCORES_LEFT, SCORES_TOP + i * SCORE_GAP); } else { SwinGame.DrawText(i + 1 + ": " + s.Name + " " + s.Value, Color.White, GameResources.GameFont("Courier"), SCORES_LEFT, SCORES_TOP + i * SCORE_GAP); } } }
// '' <summary> // '' Draws the settings menu to the screen. // '' </summary> // '' <remarks> // '' Also shows the main menu // '' </remarks> public static void DrawSettings() { // Clears the Screen to Black // SwinGame.DrawText("Settings", Color.White, GameFont("ArialLarge"), 50, 50) MenuController.DrawButtons(MAIN_MENU); MenuController.DrawButtons(SETUP_MENU, 1, 1); }
// '' <summary> // '' Draw the buttons associated with a top level menu. // '' </summary> // '' <param name="menu">the index of the menu to draw</param> private static void DrawButtons(int menu) { MenuController.DrawButtons(menu, 0, 0); }
// '' <summary> // '' Draws the Game menu to the screen // '' </summary> public static void DrawGameMenu() { // Clears the Screen to Black // SwinGame.DrawText("Paused", Color.White, GameFont("ArialLarge"), 50, 50) MenuController.DrawButtons(GAME_MENU); }
// '' <summary> // '' Draws the main menu to the screen. // '' </summary> public static void DrawMainMenu() { // Clears the Screen to Black // SwinGame.DrawText("Main Menu", Color.White, GameFont("ArialLarge"), 50, 50) MenuController.DrawButtons(MAIN_MENU); }