(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:
@@ -232,11 +232,11 @@ namespace Barotrauma
|
||||
{
|
||||
if (!ResizeHorizontal && !ResizeVertical)
|
||||
{
|
||||
sprite.Draw(spriteBatch, new Vector2(placeRect.Center.X, -(placeRect.Y - placeRect.Height / 2)), SpriteColor, scale: Scale * scale);
|
||||
sprite.Draw(spriteBatch, new Vector2(placeRect.Center.X, -(placeRect.Y - placeRect.Height / 2)), SpriteColor * 0.8f, scale: Scale * scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sprite != null) sprite.DrawTiled(spriteBatch, new Vector2(placeRect.X, -placeRect.Y), placeRect.Size.ToVector2(), null, SpriteColor);
|
||||
if (sprite != null) sprite.DrawTiled(spriteBatch, new Vector2(placeRect.X, -placeRect.Y), placeRect.Size.ToVector2(), null, SpriteColor * 0.8f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Barotrauma
|
||||
public override void DrawPlacing(SpriteBatch spriteBatch, Rectangle placeRect, float scale = 1.0f)
|
||||
{
|
||||
// TODO: the scale property is not used
|
||||
sprite.DrawTiled(spriteBatch, new Vector2(placeRect.X, -placeRect.Y), new Vector2(placeRect.Width, placeRect.Height), textureScale: TextureScale * Scale);
|
||||
sprite.DrawTiled(spriteBatch, new Vector2(placeRect.X, -placeRect.Y), new Vector2(placeRect.Width, placeRect.Height), color: Color.White * 0.8f, textureScale: TextureScale * Scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user