/// <summary> /// Adds the breakpoint overlay and relays events. /// </summary> public static void CreateAndSetup(int id, SfcPatchNode patch, BreakpointManager target) { BreakpointOverlayButton button = (BreakpointOverlayButton)GD.Load <PackedScene>(Scene).Instance(); button._patchId = id; button._target = target; button.Connect("toggled", button, nameof(OnButtonToggled)); patch.OverlayWith(button); }
public BreakpointManager(Master master, Sfc2dEditorNode _sfc2dEditorNode) { CheckSet = new HashSet <int>(); _master = master; IReadOnlyDictionary <int, SfcPatchControl> map = _sfc2dEditorNode.Sfc2dEditorControl.ControlMap; foreach (var entity in map) { if (entity.Value.Data.ContainsRealStep()) { BreakpointOverlayButton.CreateAndSetup(entity.Key, entity.Value.SfcPatchNode, this); } } }