void LevelSelect(object sender, EventArgs e) { SelectLevel temp = sender as SelectLevel; loadGame(); level = temp.Level; levelSetup(); menus.Current = "Playing Game"; enableMenus(false); }
void loadMenus() { //Load menus with null event handlers menus.add(new Options(Content, @"Menus\Standard Menu")); menus.add(new About(Content, @"Menus\About Menu")); menus.add(new Controls(Content, input, @"Menus\Standard Menu")); //Load menus with non-null event handlers menus.add(new TitleScreen(Content, @"Menus\Main Menu")); menus.getMenu("Title Screen").options[0].Selected += StartGame; menus.add(new TouchPad(menus.getMenu("Options"), Content, @"Menus\Small Menu")); menus.getMenu("Touch Pad").options[0].Selected += TouchOn; menus.getMenu("Touch Pad").options[1].Selected += TouchOff; menus.add(new Sound(menus.getMenu("Options"), Content, @"Menus\Small Menu")); menus.getMenu("Sound").options[0].Selected += SoundOn; menus.getMenu("Sound").options[1].Selected += SoundOff; menus.add(new Fail(Content, @"Menus\In Game Menu")); menus.getMenu("Game Over").options[0].Selected += RestartGame; menus.getMenu("Game Over").options[1].Selected += QuitGame; menus.add(new HighScores(Content, @"Menus\Standard Menu")); menus.getMenu("High Scores").options[0].Selected += ResetHighScores; menus.add(new MediaPlayerMenu(Content, @"Menus\Standard Menu")); menus.getMenu("Media Player Menu").options[0].Selected += AccessMediaPlayer; menus.getMenu("Media Player Menu").options[1].Selected += ManagePlaylist; menus.add(new Shuffle(menus.getMenu("Media Player Menu"), Content, @"Menus\Small Menu")); menus.getMenu("Shuffle").options[0].Selected += ShuffleOn; menus.getMenu("Shuffle").options[1].Selected += ShuffleOff; menus.add(new Repeat(menus.getMenu("Media Player Menu"), Content, @"Menus\Small Menu")); menus.getMenu("Repeat").options[0].Selected += RepeatOn; menus.getMenu("Repeat").options[1].Selected += RepeatOff; menus.add(new PlaylistMenu(Content, @"Menus\Media Menu")); menus.getMenu("Playlist Menu").options[0].Selected += AccessPlaylist; menus.getMenu("Playlist Menu").options[1].Selected += AccessArtists; menus.getMenu("Playlist Menu").options[2].Selected += AccessAlbums; menus.getMenu("Playlist Menu").options[3].Selected += AccessSongs; menus.getMenu("Playlist Menu").options[4].Selected += AccessGenres; menus.getMenu("Playlist Menu").options[5].Selected += ClearPlayList; menus.add(new Colors(Content, @"Menus\Standard Menu")); menus.getMenu("Colors").options[2].Selected += ResetColors; menus.add(new BrickStyles(Content, @"Menus\Standard Menu")); menus.getMenu("Brick Styles").options[0].Selected += SetCatEye; menus.getMenu("Brick Styles").options[1].Selected += SetQuatrix; menus.getMenu("Brick Styles").options[2].Selected += SetRound; menus.getMenu("Brick Styles").options[3].Selected += SetClassic; //Load special menus SelectLevel temp = new SelectLevel(Content, @"Menus\Select Level Menu"); temp.Selected += LevelSelect; menus.add(temp); //Load Color Menus menus.add(new OBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("O-Block Color").options[3].Selected += SaveColors; menus.add(new TBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("T-Block Color").options[3].Selected += SaveColors; menus.add(new IBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("I-Block Color").options[3].Selected += SaveColors; menus.add(new ZBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("Z-Block Color").options[3].Selected += SaveColors; menus.add(new SBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("S-Block Color").options[3].Selected += SaveColors; menus.add(new LBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("L-Block Color").options[3].Selected += SaveColors; menus.add(new JBlockColor(Content, @"Menus\Standard Menu")); menus.getMenu("J-Block Color").options[3].Selected += SaveColors; menus.add(new BlockList(Content, @"Menus\Standard Menu")); }