Remove hardcoded map references from MapPreviewWidget; prevents information leakage between lobby and map selector and provides groundwork for future patches

This commit is contained in:
Paul Chote
2010-07-11 14:25:29 +12:00
parent ca07318dc5
commit 7591434987
6 changed files with 60 additions and 76 deletions

View File

@@ -33,6 +33,7 @@ namespace OpenRA.Widgets.Delegates
var r = Chrome.rootWidget;
var bg = r.GetWidget("MAP_CHOOSER");
bg.GetWidget<MapPreviewWidget>("MAPCHOOSER_MAP_PREVIEW").Map = () => {return Game.chrome.currentMap;};
bg.GetWidget<LabelWidget>("CURMAP_TITLE").GetText = () => {return Game.chrome.currentMap.Title;};
bg.GetWidget<LabelWidget>("CURMAP_SIZE").GetText = () => {return "{0}x{1}".F(Game.chrome.currentMap.Width, Game.chrome.currentMap.Height);};
bg.GetWidget<LabelWidget>("CURMAP_THEATER").GetText = () => {return Rules.TileSets[Game.chrome.currentMap.Tileset].Name;};