More lobby polish (mainly map chooser).

This commit is contained in:
Paul Chote
2010-11-30 21:20:57 +13:00
parent 564a4598b9
commit 08eeec4d99
8 changed files with 337 additions and 242 deletions

View File

@@ -346,11 +346,26 @@ namespace OpenRA.Widgets
}
public class ContainerWidget : Widget {
public ContainerWidget() : base() { }
public Func<string> GetBackground;
public string Background = null;
public ContainerWidget() : base()
{
GetBackground = () => Background;
}
public ContainerWidget(ContainerWidget other) : base(other)
{
Background = other.Background;
GetBackground = other.GetBackground;
}
public ContainerWidget(Widget other) : base(other) { }
public override void DrawInner( WorldRenderer wr ) { }
public override void DrawInner( WorldRenderer wr )
{
var bg = GetBackground();
if (bg != null)
WidgetUtils.DrawPanel(bg, RenderBounds );
}
public override string GetCursor(int2 pos) { return null; }
public override Widget Clone() { return new ContainerWidget(this); }