Some new wall sprites, wires are automatically dropped if both items they're attached to are removed, other items aren't highlighted while dragging an item in editor

This commit is contained in:
Regalis
2016-05-22 01:31:36 +03:00
parent b2f83b43f8
commit 00b1ec38e2
8 changed files with 107 additions and 49 deletions

View File

@@ -291,20 +291,23 @@ namespace Barotrauma
MapEntity highLightedEntity = null;
foreach (MapEntity e in mapEntityList)
if (startMovingPos == Vector2.Zero)
{
if (!e.SelectableInEditor) continue;
if (highLightedEntity == null || e.Sprite == null ||
(highLightedEntity.Sprite!=null && e.Sprite.Depth < highLightedEntity.Sprite.Depth))
foreach (MapEntity e in mapEntityList)
{
if (!e.SelectableInEditor) continue;
if (e.IsMouseOn(position)) highLightedEntity = e;
if (highLightedEntity == null || e.Sprite == null ||
(highLightedEntity.Sprite != null && e.Sprite.Depth < highLightedEntity.Sprite.Depth))
{
if (e.IsMouseOn(position)) highLightedEntity = e;
}
e.isSelected = false;
}
e.isSelected = false;
}
if (highLightedEntity != null) highLightedEntity.isHighlighted = true;
if (highLightedEntity != null) highLightedEntity.isHighlighted = true;
}
foreach (MapEntity e in selectedList)
{
@@ -551,13 +554,6 @@ namespace Barotrauma
{
resizing = false;
}
//if (resizeHorizontal) placeSize.X = position.X - placePosition.X;
//if (resizeVertical) placeSize.Y = placePosition.Y - position.Y;
//Rectangle newRect = Submarine.AbsRect(placePosition, placeSize);
//newRect.Width = (int)Math.Max(newRect.Width, Submarine.GridSize.X);
//newRect.Height = (int)Math.Max(newRect.Height, Submarine.GridSize.Y);
}
}