Improved wire editing logic:
- wires have to be selected by clicking before any nodes can be moved - wires can be selected by clicking either the nodes or the sections - new nodes can be added by clicking a section while holding ctrl - the selected wire is drawn on top of all other entities
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Barotrauma.Items.Components;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using System;
|
||||
@@ -920,6 +921,17 @@ namespace Barotrauma
|
||||
me.IsHighlighted = false;
|
||||
}
|
||||
|
||||
if (wiringMode)
|
||||
{
|
||||
List<Wire> wires = new List<Wire>();
|
||||
foreach (Item item in Item.ItemList)
|
||||
{
|
||||
var wire = item.GetComponent<Wire>();
|
||||
if (wire != null) wires.Add(wire);
|
||||
}
|
||||
Wire.UpdateEditing(wires);
|
||||
}
|
||||
|
||||
if (dummyCharacter.SelectedConstruction==null)
|
||||
{
|
||||
Vector2 mouseSimPos = FarseerPhysics.ConvertUnits.ToSimUnits(dummyCharacter.CursorPosition);
|
||||
|
||||
Reference in New Issue
Block a user