Lobby is made up of a few more widgets
This commit is contained in:
20
OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs
Normal file
20
OpenRA.Game/Widgets/Delegates/LobbyDelegate.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenRA.Widgets.Delegates
|
||||
{
|
||||
public class LobbyDelegate : IWidgetDelegate
|
||||
{
|
||||
public LobbyDelegate ()
|
||||
{
|
||||
var r = Chrome.rootWidget;
|
||||
var lobby = r.GetWidget("SERVER_LOBBY");
|
||||
var mapButton = lobby.GetWidget("CHANGEMAP_BUTTON");
|
||||
mapButton.OnMouseUp = mi => {
|
||||
r.OpenWindow("MAP_CHOOSER");
|
||||
return true;
|
||||
};
|
||||
mapButton.IsVisible = () => {return (mapButton.Visible && Game.IsHost);};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user