#1284 fixed; don't show spawnpoints on serverbrowser thumbnails

This commit is contained in:
Chris Forbes
2011-12-31 11:32:59 +13:00
parent 809b716d0d
commit 965fe88755
3 changed files with 17 additions and 10 deletions

View File

@@ -22,6 +22,7 @@ namespace OpenRA.Widgets
public Func<Dictionary<int2, Color>> SpawnColors = () => new Dictionary<int2, Color>();
public Action<MouseInput> OnMouseDown = _ => {};
public bool IgnoreMouseInput = false;
public bool ShowSpawnPoints = true;
static Cache<Map,Bitmap> PreviewCache = new Cache<Map, Bitmap>(stub => Minimap.RenderMapPreview( new Map( stub.Path )));
@@ -33,6 +34,7 @@ namespace OpenRA.Widgets
lastMap = other.lastMap;
Map = other.Map;
SpawnColors = other.SpawnColors;
ShowSpawnPoints = other.ShowSpawnPoints;
}
public override Widget Clone() { return new MapPreviewWidget(this); }
@@ -90,8 +92,10 @@ namespace OpenRA.Widgets
new float2(MapRect.Location),
new float2( MapRect.Size ) );
// Overlay spawnpoints
if (ShowSpawnPoints)
{
var colors = SpawnColors();
foreach (var p in map.GetSpawnPoints())
{
var owned = colors.ContainsKey(p);
@@ -107,3 +111,4 @@ namespace OpenRA.Widgets
}
}
}
}

View File

@@ -38,6 +38,7 @@ Container@SERVERBROWSER_PANEL:
Y:2
Width:64
Height:64
ShowSpawnPoints:no
Label@TITLE:
Id:TITLE
X:70

View File

@@ -35,6 +35,7 @@ Background@JOINSERVER_BG:
Y:2
Width:64
Height:64
ShowSpawnPoints:no
Label@TITLE:
Id:TITLE
X:70