Add cell height display to map editor.

This commit is contained in:
Paul Chote
2017-01-13 19:05:29 +00:00
parent 544e40ecab
commit 7249ca7f88

View File

@@ -86,7 +86,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var coordinateLabel = widget.GetOrNull<LabelWidget>("COORDINATE_LABEL");
if (coordinateLabel != null)
coordinateLabel.GetText = () => worldRenderer.Viewport.ViewToWorld(Viewport.LastMousePos).ToString();
{
coordinateLabel.GetText = () =>
{
var cell = worldRenderer.Viewport.ViewToWorld(Viewport.LastMousePos);
var map = worldRenderer.World.Map;
var height = map.Height.Contains(cell) ? map.Height[cell] : 0;
return "{0},{1}".F(cell, height);
};
}
var cashLabel = widget.GetOrNull<LabelWidget>("CASH_LABEL");
if (cashLabel != null)