MusicPlayer visibility controls
This commit is contained in:
@@ -33,6 +33,7 @@ namespace OpenRA.GameRules
|
||||
public readonly int Width = 0;
|
||||
public readonly int Height = 0;
|
||||
public readonly bool Fullscreen = false;
|
||||
public bool MusicPlayer = true;
|
||||
|
||||
// Internal game settings
|
||||
public readonly int Timestep = 40;
|
||||
|
||||
@@ -43,6 +43,14 @@ namespace OpenRA.Widgets.Delegates
|
||||
return true;
|
||||
};
|
||||
|
||||
r.GetWidget<CheckboxWidget>("SETTINGS_CHECKBOX_MUSICPLAYER").Checked = () => { return Game.Settings.MusicPlayer; };
|
||||
r.GetWidget("SETTINGS_CHECKBOX_MUSICPLAYER").OnMouseDown = mi =>
|
||||
{
|
||||
Game.Settings.MusicPlayer ^= true;
|
||||
r.GetWidget("MUSIC_BG").Visible = Game.Settings.MusicPlayer;
|
||||
return true;
|
||||
};
|
||||
|
||||
// Menu Buttons
|
||||
r.GetWidget("MAINMENU_BUTTON_SETTINGS").OnMouseUp = mi => {
|
||||
r.OpenWindow("SETTINGS_BG");
|
||||
|
||||
@@ -143,6 +143,13 @@ Container:
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Collect Sync Reports
|
||||
Checkbox@SETTINGS_CHECKBOX_MUSICPLAYER:
|
||||
Id:SETTINGS_CHECKBOX_MUSICPLAYER
|
||||
X:100
|
||||
Y:210
|
||||
Width:300
|
||||
Height:20
|
||||
Text:Show Music Player
|
||||
Button@SETTINGS_BUTTON_OK:
|
||||
Id:SETTINGS_BUTTON_OK
|
||||
X:PARENT_RIGHT - 180
|
||||
|
||||
Reference in New Issue
Block a user