show the current coordinate at the top

This commit is contained in:
Matthias Mailänder
2015-08-16 21:58:47 +02:00
parent 51fabae106
commit 41698ab8bb
3 changed files with 20 additions and 2 deletions

View File

@@ -61,6 +61,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
selectedLabel = selectedZoom.ToString();
};
}
var coordinateLabel = widget.GetOrNull<LabelWidget>("COORDINATE_LABEL");
if (coordinateLabel != null)
coordinateLabel.GetText = () => worldRenderer.Viewport.ViewToWorld(Viewport.LastMousePos).ToString();
}
}
}

View File

@@ -383,3 +383,10 @@ Container@EDITOR_WORLD_ROOT:
Width: 70
Height: 25
Font: Bold
Label@COORDINATE_LABEL:
X: 10
Width: 50
Height: 25
Align: Left
Font: Bold
Contrast: true

View File

@@ -370,3 +370,10 @@ Container@EDITOR_WORLD_ROOT:
Width: 70
Height: 25
Font: Bold
Label@COORDINATE_LABEL:
X: 485
Width: 50
Height: 25
Align: Left
Font: Bold
Contrast: true