Multi-window input handling. (#3911)

This commit is contained in:
Pieter-Jan Briers
2021-05-02 20:48:00 +02:00
committed by GitHub
parent 31c5b18fe2
commit d796dcfcca
12 changed files with 18 additions and 18 deletions

View File

@@ -210,7 +210,7 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter
}
var screenCoordinates = _eyeManager.CoordinatesToScreen(AttachedEntity.Transform.Coordinates);
_playerPosition = new ScreenCoordinates(screenCoordinates.X / UIScale, screenCoordinates.Y / UIScale);
_playerPosition = new ScreenCoordinates(screenCoordinates.Position / UIScale, screenCoordinates.Window);
LayoutContainer.SetPosition(this, new Vector2(_playerPosition.X - Width / 2, _playerPosition.Y - Height - 30.0f));
}
}

View File

@@ -96,7 +96,7 @@ namespace Content.Client.GameObjects.EntitySystems
panel.Measure(Vector2.Infinity);
var size = Vector2.ComponentMax((minWidth, 0), panel.DesiredSize);
_examineTooltipOpen.Open(UIBox2.FromDimensions(popupPos, size));
_examineTooltipOpen.Open(UIBox2.FromDimensions(popupPos.Position, size));
FormattedMessage message;
if (entity.Uid.IsClientSide())

View File

@@ -147,7 +147,7 @@ namespace Content.Client.GameObjects.EntitySystems.HealthOverlay
Visible = true;
var screenCoordinates = _eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates);
var playerPosition = new ScreenCoordinates(screenCoordinates.X / UIScale, screenCoordinates.Y / UIScale);
var playerPosition = UserInterfaceManager.ScreenToUIPosition(screenCoordinates);
LayoutContainer.SetPosition(this, new Vector2(playerPosition.X - Width / 2, playerPosition.Y - Height - 30.0f));
}

View File

@@ -119,7 +119,7 @@ namespace Content.Client.GameObjects.EntitySystems
public void OnContextButtonPressed(IEntity entity)
{
OpenContextMenu(entity, new ScreenCoordinates(_userInterfaceManager.MousePositionScaled));
OpenContextMenu(entity, _userInterfaceManager.MousePositionScaled);
}
private void FillEntityPopup(VerbSystemMessages.VerbsResponseMessage msg)