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

@@ -198,14 +198,14 @@ namespace Content.Client.UserInterface
{
_dragShadow.Texture = _dragDropHelper.Dragged!.Action.Icon.Frame0();
// don't make visible until frameupdate, otherwise it'll flicker
LayoutContainer.SetPosition(_dragShadow, UserInterfaceManager.MousePositionScaled - (32, 32));
LayoutContainer.SetPosition(_dragShadow, UserInterfaceManager.MousePositionScaled.Position - (32, 32));
return true;
}
private bool OnContinueActionDrag(float frameTime)
{
// keep dragged entity centered under mouse
LayoutContainer.SetPosition(_dragShadow, UserInterfaceManager.MousePositionScaled - (32, 32));
LayoutContainer.SetPosition(_dragShadow, UserInterfaceManager.MousePositionScaled.Position - (32, 32));
// we don't set this visible until frameupdate, otherwise it flickers
_dragShadow.Visible = true;
return true;