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

@@ -533,7 +533,7 @@ namespace Content.Client.UserInterface
if (Locked || DragDropHelper.Dragged?.Action == null) return false;
_dragShadow.Texture = DragDropHelper.Dragged.Action.Icon.Frame0();
LayoutContainer.SetPosition(_dragShadow, UserInterfaceManager.MousePositionScaled - (32, 32));
LayoutContainer.SetPosition(_dragShadow, UserInterfaceManager.MousePositionScaled.Position - (32, 32));
DragDropHelper.Dragged.CancelPress();
return true;
}
@@ -544,7 +544,7 @@ namespace Content.Client.UserInterface
if (Locked || DragDropHelper.Dragged?.Action == null) return false;
// 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;