Merge pull request #9089 from Mailaender/editor-coordinate
Added a coordinate display to the map editor
This commit is contained in:
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
var tooltip = Info.Traits.GetOrDefault<TooltipInfo>();
|
var tooltip = Info.Traits.GetOrDefault<TooltipInfo>();
|
||||||
Tooltip = tooltip == null ? Info.Name + " - " + ID : tooltip.Name + " (" + Info.Name + ") - " + ID;
|
Tooltip = tooltip == null ? ID + ": " + Info.Name : ID + ": " + tooltip.Name + " (" + Info.Name + ")";
|
||||||
|
|
||||||
GeneratePreviews();
|
GeneratePreviews();
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
selectedLabel = selectedZoom.ToString();
|
selectedLabel = selectedZoom.ToString();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var coordinateLabel = widget.GetOrNull<LabelWidget>("COORDINATE_LABEL");
|
||||||
|
if (coordinateLabel != null)
|
||||||
|
coordinateLabel.GetText = () => worldRenderer.Viewport.ViewToWorld(Viewport.LastMousePos).ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -382,4 +382,11 @@ Container@EDITOR_WORLD_ROOT:
|
|||||||
Y: 5
|
Y: 5
|
||||||
Width: 70
|
Width: 70
|
||||||
Height: 25
|
Height: 25
|
||||||
Font: Bold
|
Font: Bold
|
||||||
|
Label@COORDINATE_LABEL:
|
||||||
|
X: 10
|
||||||
|
Width: 50
|
||||||
|
Height: 25
|
||||||
|
Align: Left
|
||||||
|
Font: Bold
|
||||||
|
Contrast: true
|
||||||
@@ -369,4 +369,11 @@ Container@EDITOR_WORLD_ROOT:
|
|||||||
X: 400
|
X: 400
|
||||||
Width: 70
|
Width: 70
|
||||||
Height: 25
|
Height: 25
|
||||||
Font: Bold
|
Font: Bold
|
||||||
|
Label@COORDINATE_LABEL:
|
||||||
|
X: 485
|
||||||
|
Width: 50
|
||||||
|
Height: 25
|
||||||
|
Align: Left
|
||||||
|
Font: Bold
|
||||||
|
Contrast: true
|
||||||
Reference in New Issue
Block a user