public AudioOptionsScreen(Profile curProfile) : base("Audio Settings") { Slider masterVolumeSlider = new Slider("Master Volume:", 50); Slider musicEffectSlider = new Slider("Music Volume:", 50); Slider soundEffectSlider = new Slider("Sound Effect Volume:", 50); Slider narrationVolumeSlider = new Slider("Narration Volume:", 50); MenuEntry saveMenuEntry = new MenuEntry("Save"); MenuEntry backMenuEntry = new MenuEntry("Back"); saveMenuEntry.Pressed += SaveButton; backMenuEntry.Pressed += OnCancel; MenuEntries.Add(masterVolumeSlider); MenuEntries.Add(musicEffectSlider); MenuEntries.Add(soundEffectSlider); MenuEntries.Add(narrationVolumeSlider); MenuEntries.Add(saveMenuEntry); MenuEntries.Add(backMenuEntry); mProfile = curProfile; }
public AudioOptionsScreen(Profile curProfile) : base("Audio Settings") { masterVolumeSlider = new Slider("Master Volume:", curProfile.Audio.MasterVolume); musicEffectSlider = new Slider("Music Volume:", curProfile.Audio.MusicVolume); soundEffectSlider = new Slider("Sound Effect Volume:", curProfile.Audio.SoundEffectsVolume); narrationVolumeSlider = new Slider("Narration Volume:", curProfile.Audio.NarrationVolume); MenuEntry saveMenuEntry = new MenuEntry("Save"); MenuEntry backMenuEntry = new MenuEntry("Back"); saveMenuEntry.Pressed += SaveButton; saveMenuEntry.Pressed += OnCancel; backMenuEntry.Pressed += OnCancel; MenuEntries.Add(masterVolumeSlider); MenuEntries.Add(musicEffectSlider); MenuEntries.Add(soundEffectSlider); MenuEntries.Add(narrationVolumeSlider); StackPanel btmPanel = new StackPanel(new UIElement[]{saveMenuEntry, backMenuEntry}); MenuEntries.Add(btmPanel); mProfile = curProfile; }