#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 Func<Dictionary<int2, Color>> SpawnColors = () => new Dictionary<int2, Color>();
|
||||||
public Action<MouseInput> OnMouseDown = _ => {};
|
public Action<MouseInput> OnMouseDown = _ => {};
|
||||||
public bool IgnoreMouseInput = false;
|
public bool IgnoreMouseInput = false;
|
||||||
|
public bool ShowSpawnPoints = true;
|
||||||
|
|
||||||
static Cache<Map,Bitmap> PreviewCache = new Cache<Map, Bitmap>(stub => Minimap.RenderMapPreview( new Map( stub.Path )));
|
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;
|
lastMap = other.lastMap;
|
||||||
Map = other.Map;
|
Map = other.Map;
|
||||||
SpawnColors = other.SpawnColors;
|
SpawnColors = other.SpawnColors;
|
||||||
|
ShowSpawnPoints = other.ShowSpawnPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Widget Clone() { return new MapPreviewWidget(this); }
|
public override Widget Clone() { return new MapPreviewWidget(this); }
|
||||||
@@ -90,8 +92,10 @@ namespace OpenRA.Widgets
|
|||||||
new float2(MapRect.Location),
|
new float2(MapRect.Location),
|
||||||
new float2( MapRect.Size ) );
|
new float2( MapRect.Size ) );
|
||||||
|
|
||||||
// Overlay spawnpoints
|
if (ShowSpawnPoints)
|
||||||
|
{
|
||||||
var colors = SpawnColors();
|
var colors = SpawnColors();
|
||||||
|
|
||||||
foreach (var p in map.GetSpawnPoints())
|
foreach (var p in map.GetSpawnPoints())
|
||||||
{
|
{
|
||||||
var owned = colors.ContainsKey(p);
|
var owned = colors.ContainsKey(p);
|
||||||
@@ -107,3 +111,4 @@ namespace OpenRA.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ Container@SERVERBROWSER_PANEL:
|
|||||||
Y:2
|
Y:2
|
||||||
Width:64
|
Width:64
|
||||||
Height:64
|
Height:64
|
||||||
|
ShowSpawnPoints:no
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
Id:TITLE
|
Id:TITLE
|
||||||
X:70
|
X:70
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ Background@JOINSERVER_BG:
|
|||||||
Y:2
|
Y:2
|
||||||
Width:64
|
Width:64
|
||||||
Height:64
|
Height:64
|
||||||
|
ShowSpawnPoints:no
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
Id:TITLE
|
Id:TITLE
|
||||||
X:70
|
X:70
|
||||||
|
|||||||
Reference in New Issue
Block a user