Machine Port Prototypes (#7659)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Leon Friedrich
2022-05-12 20:46:20 +12:00
committed by GitHub
parent 32c2eb7a02
commit c00b459e31
29 changed files with 422 additions and 220 deletions

View File

@@ -66,7 +66,7 @@ namespace Content.Client.Popups
_userInterfaceManager.PopupRoot.AddChild(label);
label.Measure(Vector2.Infinity);
var mapCoordinates = _eyeManager.ScreenToMap(coordinates.Position / label.UIScale - label.DesiredSize / 2);
var mapCoordinates = _eyeManager.ScreenToMap(coordinates.Position);
label.InitialPos = mapCoordinates;
LayoutContainer.SetPosition(label, label.InitialPos.Position);
_aliveLabels.Add(label);
@@ -204,7 +204,7 @@ namespace Content.Client.Popups
Vector2 position;
if (Entity == null)
position = InitialPos.Position;
position = _eyeManager.WorldToScreen(InitialPos.Position) / UIScale - DesiredSize / 2;
else if (_entityManager.TryGetComponent(Entity.Value, out TransformComponent xform))
position = (_eyeManager.CoordinatesToScreen(xform.Coordinates).Position / UIScale) - DesiredSize / 2;
else