Exemple #1
0
        public override void UpdateComponentInfo(FIRComponentUpdate updateData)
        {
            WireRouter.UpdateIOFromNode(updateData.Node, updateData.InputOffsets, updateData.OutputOffsets);
            NodePlacer.SetNodeSize(updateData.Node, updateData.Size);

            if (IsReadyToRender())
            {
                DebugCtrl.AddPlaceTemplateParameters(Mod.Name, NodePlacer, ModuleNodes);
            }
        }
        public override void UpdateComponentInfo(FIRComponentUpdate updateData)
        {
            lock (ModuleSizes)
            {
                //Keep track of data changes. Layout will only update if there has
                //been a data change and all data is available.
                bool dataChanged = false;

                dataChanged |= UpdateNodeSize(updateData.Node, updateData.Size);
                dataChanged |= UpdateOffsets(updateData.Node, InputOffsets, updateData.InputOffsets);
                dataChanged |= UpdateOffsets(updateData.Node, OutputOffsets, updateData.OutputOffsets);

                if (IsReadyToRender() && dataChanged)
                {
                    var layoutData = UpdateAndGetModPositions();
                    FIRComponentUpdate componentUpdate = new FIRComponentUpdate(Cond, CondSize, layoutData.inOffsets, layoutData.outOffsets);
                    OnLayoutUpdate?.Invoke(layoutData.modPoses, componentUpdate);
                }
            }
        }
Exemple #3
0
 public abstract void UpdateComponentInfo(FIRComponentUpdate updateData);