move cnc shellmap music toggle into Sound settings group where it belongs

This commit is contained in:
Chris Forbes
2011-09-24 20:37:03 +12:00
parent 68801ba7b5
commit c608b45ef0
3 changed files with 4 additions and 4 deletions

View File

@@ -73,6 +73,7 @@ namespace OpenRA.GameRules
public float VideoVolume = 0.5f; public float VideoVolume = 0.5f;
public bool Shuffle = false; public bool Shuffle = false;
public bool Repeat = false; public bool Repeat = false;
public bool ShellmapMusic = true;
} }
public class PlayerSettings public class PlayerSettings
@@ -87,7 +88,6 @@ namespace OpenRA.GameRules
public class GameSettings public class GameSettings
{ {
public string[] Mods = { "ra" }; public string[] Mods = { "ra" };
public bool ShellmapMusic = true;
public bool TeamChatToggle = false; public bool TeamChatToggle = false;

View File

@@ -103,8 +103,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
musicSlider.Value = soundSettings.MusicVolume; musicSlider.Value = soundSettings.MusicVolume;
var shellmapMusicCheckbox = generalPane.GetWidget<CheckboxWidget>("SHELLMAP_MUSIC"); var shellmapMusicCheckbox = generalPane.GetWidget<CheckboxWidget>("SHELLMAP_MUSIC");
shellmapMusicCheckbox.IsChecked = () => gameSettings.ShellmapMusic; shellmapMusicCheckbox.IsChecked = () => soundSettings.ShellmapMusic;
shellmapMusicCheckbox.OnClick = () => gameSettings.ShellmapMusic ^= true; shellmapMusicCheckbox.OnClick = () => soundSettings.ShellmapMusic ^= true;
// Input pane // Input pane
var inputPane = panel.GetWidget("INPUT_CONTROLS"); var inputPane = panel.GetWidget("INPUT_CONTROLS");

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA
{ {
var onComplete = Info.Loop ? (Action)PlayMusic : () => {}; var onComplete = Info.Loop ? (Action)PlayMusic : () => {};
if (Game.Settings.Game.ShellmapMusic && if (Game.Settings.Sound.ShellmapMusic &&
Rules.Music.ContainsKey(Info.Music)) Rules.Music.ContainsKey(Info.Music))
Sound.PlayMusicThen(Rules.Music[Info.Music], onComplete); Sound.PlayMusicThen(Rules.Music[Info.Music], onComplete);
} }