Multi-window input handling. (#3911)
This commit is contained in:
committed by
GitHub
parent
31c5b18fe2
commit
d796dcfcca
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user