Lobby is made up of a few more widgets

This commit is contained in:
alzeih
2010-04-23 19:58:56 +12:00
parent 6249bbd897
commit 38c608b5f6
4 changed files with 92 additions and 31 deletions

View 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);};
}
}
}