#1284 fixed; don't show spawnpoints on serverbrowser thumbnails
This commit is contained in:
@@ -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);
|
||||
@@ -106,4 +110,5 @@ namespace OpenRA.Widgets
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ Container@SERVERBROWSER_PANEL:
|
||||
Y:2
|
||||
Width:64
|
||||
Height:64
|
||||
ShowSpawnPoints:no
|
||||
Label@TITLE:
|
||||
Id:TITLE
|
||||
X:70
|
||||
|
||||
@@ -35,6 +35,7 @@ Background@JOINSERVER_BG:
|
||||
Y:2
|
||||
Width:64
|
||||
Height:64
|
||||
ShowSpawnPoints:no
|
||||
Label@TITLE:
|
||||
Id:TITLE
|
||||
X:70
|
||||
|
||||
Reference in New Issue
Block a user