Added author and description to map chooser, fixes #290. Added word wrap to the LabelWidget to support it.

This commit is contained in:
Matthew Bowra-Dean
2010-11-29 22:29:05 +13:00
committed by Paul Chote
parent b44cb9ad57
commit 57f74606f0
4 changed files with 137 additions and 14 deletions

View File

@@ -34,6 +34,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
var ml = bg.GetWidget<ScrollPanelWidget>("MAP_LIST");
bg.GetWidget<MapPreviewWidget>("MAPCHOOSER_MAP_PREVIEW").Map = () => Map;
bg.GetWidget<LabelWidget>("CURMAP_TITLE").GetText = () => Map.Title;
bg.GetWidget<LabelWidget>("CURMAP_AUTHOR").GetText = () => Map.Author;
bg.GetWidget<LabelWidget>("CURMAP_DESC").GetText = () => Map.Description;
bg.GetWidget<LabelWidget>("CURMAP_SIZE").GetText = () => "{0}x{1}".F(Map.Bounds.Width, Map.Bounds.Height);
bg.GetWidget<LabelWidget>("CURMAP_THEATER").GetText = () => Rules.TileSets[Map.Tileset].Name;
bg.GetWidget<LabelWidget>("CURMAP_PLAYERS").GetText = () => Map.PlayerCount.ToString();