From 51fabae1061a2f270de7736ad742dc3c7390958b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 16 Aug 2015 21:58:17 +0200 Subject: [PATCH 1/2] change editor tooltip to actor: description (type) --- OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs b/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs index 578ffa5298..279687484f 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorActorPreview.cs @@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits } var tooltip = Info.Traits.GetOrDefault(); - Tooltip = tooltip == null ? Info.Name + " - " + ID : tooltip.Name + " (" + Info.Name + ") - " + ID; + Tooltip = tooltip == null ? ID + ": " + Info.Name : ID + ": " + tooltip.Name + " (" + Info.Name + ")"; GeneratePreviews(); From 41698ab8bbc5cc326b5f4934e127dafbf1919a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 16 Aug 2015 21:58:47 +0200 Subject: [PATCH 2/2] show the current coordinate at the top --- .../Widgets/Logic/Editor/MapEditorLogic.cs | 4 ++++ mods/cnc/chrome/editor.yaml | 9 ++++++++- mods/ra/chrome/editor.yaml | 9 ++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs index c0a88b155d..662331f366 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs @@ -61,6 +61,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic selectedLabel = selectedZoom.ToString(); }; } + + var coordinateLabel = widget.GetOrNull("COORDINATE_LABEL"); + if (coordinateLabel != null) + coordinateLabel.GetText = () => worldRenderer.Viewport.ViewToWorld(Viewport.LastMousePos).ToString(); } } } diff --git a/mods/cnc/chrome/editor.yaml b/mods/cnc/chrome/editor.yaml index cdd1733c4a..ea63fc785b 100644 --- a/mods/cnc/chrome/editor.yaml +++ b/mods/cnc/chrome/editor.yaml @@ -382,4 +382,11 @@ Container@EDITOR_WORLD_ROOT: Y: 5 Width: 70 Height: 25 - Font: Bold \ No newline at end of file + Font: Bold + Label@COORDINATE_LABEL: + X: 10 + Width: 50 + Height: 25 + Align: Left + Font: Bold + Contrast: true \ No newline at end of file diff --git a/mods/ra/chrome/editor.yaml b/mods/ra/chrome/editor.yaml index e1ce379a32..3dc9e2fd68 100644 --- a/mods/ra/chrome/editor.yaml +++ b/mods/ra/chrome/editor.yaml @@ -369,4 +369,11 @@ Container@EDITOR_WORLD_ROOT: X: 400 Width: 70 Height: 25 - Font: Bold \ No newline at end of file + Font: Bold + Label@COORDINATE_LABEL: + X: 485 + Width: 50 + Height: 25 + Align: Left + Font: Bold + Contrast: true \ No newline at end of file