private final WireArray wa;\r
private final double[] path;\r
\r
- public GUIWire(BasicGUIComponent component1, int component1ConnectionIndex, Point component1Pos, BasicGUIComponent component2, int component2ConnectionIndex, Point component2Pos, Point... path)\r
+ public GUIWire(Runnable redraw, BasicGUIComponent component1, int component1ConnectionIndex, Point component1Pos, BasicGUIComponent component2, int component2ConnectionIndex, Point component2Pos, Point... path)\r
{\r
this.wa = component1.getConnectedWireArray(component1ConnectionIndex);\r
if(!Objects.equals(wa, component2.getConnectedWireArray(component2ConnectionIndex)))\r
Point component2ConnectionPoint = component2.getWireArrayConnectionPoint(component2ConnectionIndex);\r
this.path[this.path.length - 2] = component2Pos.x + component2ConnectionPoint.x;\r
this.path[this.path.length - 1] = component2Pos.y + component2ConnectionPoint.y;\r
+\r
+ wa.addObserver((initiator, oldValues) -> redraw.run());\r
}\r
\r
public void render(GeneralGC gc)\r