void OnToggled(CheckBox newCheckBox, CheckBox oldCheckBox) { if (oldCheckBox != null) { manipulators[oldCheckBox].OnDisabled(); manipulator = null; } if (newCheckBox != null) { manipulator = manipulators[newCheckBox]; manipulator.OnEnabled(); } }
public override void Enable() { if (enabled) { return; } checkBoxes.Show(); manipulator?.OnEnabled(); input.MouseDown += OnMouseDown; input.MouseMove += OnMouseMoved; input.MouseUp += OnMouseUp; camera.CameraMoved += OnCameraMove; enabled = true; }