MusicPlayer visibility controls
This commit is contained in:
@@ -33,6 +33,7 @@ namespace OpenRA.GameRules
|
|||||||
public readonly int Width = 0;
|
public readonly int Width = 0;
|
||||||
public readonly int Height = 0;
|
public readonly int Height = 0;
|
||||||
public readonly bool Fullscreen = false;
|
public readonly bool Fullscreen = false;
|
||||||
|
public bool MusicPlayer = true;
|
||||||
|
|
||||||
// Internal game settings
|
// Internal game settings
|
||||||
public readonly int Timestep = 40;
|
public readonly int Timestep = 40;
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
Game.Settings.RecordSyncReports ^= true;
|
Game.Settings.RecordSyncReports ^= true;
|
||||||
return true;
|
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
|
// Menu Buttons
|
||||||
r.GetWidget("MAINMENU_BUTTON_SETTINGS").OnMouseUp = mi => {
|
r.GetWidget("MAINMENU_BUTTON_SETTINGS").OnMouseUp = mi => {
|
||||||
|
|||||||
@@ -143,6 +143,13 @@ Container:
|
|||||||
Width:300
|
Width:300
|
||||||
Height:20
|
Height:20
|
||||||
Text:Collect Sync Reports
|
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:
|
Button@SETTINGS_BUTTON_OK:
|
||||||
Id:SETTINGS_BUTTON_OK
|
Id:SETTINGS_BUTTON_OK
|
||||||
X:PARENT_RIGHT - 180
|
X:PARENT_RIGHT - 180
|
||||||
|
|||||||
Reference in New Issue
Block a user