make CncLobbyLogic tolerant of missing music button
This commit is contained in:
@@ -190,13 +190,10 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
chatTemplate = chatPanel.GetWidget("CHAT_TEMPLATE");
|
chatTemplate = chatPanel.GetWidget("CHAT_TEMPLATE");
|
||||||
chatPanel.RemoveChildren();
|
chatPanel.RemoveChildren();
|
||||||
|
|
||||||
lobby.GetWidget<ButtonWidget>("MUSIC_BUTTON").OnClick = () =>
|
var musicButton = lobby.GetWidget<ButtonWidget>("MUSIC_BUTTON");
|
||||||
{
|
if (musicButton != null)
|
||||||
Widget.OpenWindow("MUSIC_PANEL", new WidgetArgs()
|
musicButton.OnClick = () => Widget.OpenWindow("MUSIC_PANEL", new WidgetArgs
|
||||||
{
|
{ { "onExit", () => {} } });
|
||||||
{ "onExit", () => {} },
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Add a bot on the first lobbyinfo update
|
// Add a bot on the first lobbyinfo update
|
||||||
if (addBots)
|
if (addBots)
|
||||||
|
|||||||
Reference in New Issue
Block a user