public static void CreateFramestep(SceneLayers sceneLayers) { var frameStepActor = sceneLayers.DebugScene.AddActor("FrameStepActor"); var tool = new InvokableDebugTool(frameStepActor, new KeyCombination(Keys.Space, new ModifierKeys(true, false, false))); new FrameStepRenderer(frameStepActor, MachinaClient.GlobalFrameStep, sceneLayers, tool); new BoundingRect(frameStepActor, new Point(64, 64)); new Hoverable(frameStepActor); new Draggable(frameStepActor); new MoveOnDrag(frameStepActor); }
public DebugDock(Actor actor) : base(actor) { this.invokable = RequireComponent <InvokableDebugTool>(); var boundingRect = RequireComponent <BoundingRect>(); boundingRect.SetSize(new Point(this.iconWidth * 3 + this.iconPadding * 2 + this.dockMargin * 2, this.rowHeight * 2 + this.titleHeight + this.dockMargin * 2)); this.layoutGroup = RequireComponent <LayoutGroup>(); this.layoutGroup.AddHorizontallyStretchedElement("Title", this.titleHeight, titleActor => { new BoundedTextRenderer(titleActor, "Machina Debug Dock", MachinaClient.DefaultStyle.uiElementFont, Color.White, Alignment.Center); }) .SetMarginSize(new Point(this.dockMargin, this.dockMargin)); this.windowManager = new WindowManager(MachinaClient.DefaultStyle, this.actor.transform.Depth - 100); this.currentRow = AddRow(); }