static ToolManager() { MoveTool = new MoveTool(); SelectTool = new SelectTool(); ScaleTool = new ScaleTool(); RotateTool = new RotateTool(); SelectionService.Service.SelectionChanged.Event += () => { ContextActionService.SetState("selectionEmpty", SelectionService.SelectionCount == 0); }; ContextActionService.Register("tools.selectTool", () => SelectTool.IsEquipped = true); ContextActionService.Register("tools.moveTool", () => MoveTool.IsEquipped = true); ContextActionService.Register("tools.scaleTool", () => ScaleTool.IsEquipped = true); ContextActionService.Register("tools.rotateTool", () => RotateTool.IsEquipped = true); ContextActionService.Register("pickerInsideModels", PickerInsideModels); ContextActionService.Register("groupSelection", GroupSelection); ContextActionService.Register("ungroupSelection", UngroupSelection); }
protected override void OnDeactivate(bool close) { ContextActionService.SetState("scriptEditorFocus", false); }
protected override void OnActivate() { ContextActionService.SetState("scriptEditorFocus", true); }