(f7209b813) Draw the sprites of the entities that are being dragged in the sub editor (instead of just a red rectangle).

This commit is contained in:
Joonas Rikkonen
2019-03-28 12:35:57 +02:00
parent 13870a31c4
commit d7526934e6
3 changed files with 7 additions and 3 deletions
@@ -503,10 +503,14 @@ namespace Barotrauma
if (Math.Abs(moveAmount.X) >= Submarine.GridSize.X || Math.Abs(moveAmount.Y) >= Submarine.GridSize.Y)
{
foreach (MapEntity e in selectedList)
{
e.prefab.DrawPlacing(spriteBatch,
new Rectangle(e.WorldRect.Location + new Point((int)moveAmount.X, (int)-moveAmount.Y), e.WorldRect.Size));
GUI.DrawRectangle(spriteBatch,
new Vector2(e.WorldRect.X, -e.WorldRect.Y) + moveAmount,
new Vector2(e.rect.Width, e.rect.Height),
Color.DarkRed, false, 0, (int)Math.Max(1.5f / GameScreen.Selected.Cam.Zoom, 1.0f));
}
//stop dragging the "selection rectangle"
selectionPos = Vector2.Zero;