Merge pull request #6150 from Mailaender/disable-music-install-during-games
Disabled music installation during matches
This commit is contained in:
@@ -67,7 +67,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
widget.Get<ButtonWidget>("MUSIC").OnClick = () =>
|
||||
{
|
||||
widget.Visible = false;
|
||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs { { "onExit", () => { widget.Visible = true; } } });
|
||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "onExit", () => { widget.Visible = true; } },
|
||||
{ "world", world }
|
||||
});
|
||||
};
|
||||
|
||||
var resumeButton = widget.Get<ButtonWidget>("RESUME");
|
||||
|
||||
@@ -511,7 +511,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
|
||||
var musicButton = lobby.GetOrNull<ButtonWidget>("MUSIC_BUTTON");
|
||||
if (musicButton != null)
|
||||
musicButton.OnClick = () => Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs { { "onExit", DoNothing } });
|
||||
musicButton.OnClick = () => Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "onExit", DoNothing },
|
||||
{ "world", orderManager.world }
|
||||
});
|
||||
|
||||
var settingsButton = lobby.GetOrNull<ButtonWidget>("SETTINGS_BUTTON");
|
||||
if (settingsButton != null)
|
||||
|
||||
@@ -111,6 +111,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
Ui.OpenWindow("MUSIC_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "onExit", () => menuType = MenuType.Extras },
|
||||
{ "world", world }
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
ScrollItemWidget itemTemplate;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public MusicPlayerLogic(Widget widget, Ruleset modRules, Action onExit)
|
||||
public MusicPlayerLogic(Widget widget, Ruleset modRules, World world, Action onExit)
|
||||
{
|
||||
this.modRules = modRules;
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
var installButton = widget.GetOrNull<ButtonWidget>("INSTALL_BUTTON");
|
||||
if (installButton != null)
|
||||
{
|
||||
installButton.IsDisabled = () => !world.IsShellmap;
|
||||
var args = new string[] { "Launch.Window=INSTALL_MUSIC_PANEL" };
|
||||
installButton.OnClick = () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user