void Tool() { GUILayout.BeginVertical("box"); showTool = GUILayout.Toggle(showTool, "Tool", "boxhead"); if (showTool) { Edit.Tool tool = (Edit.Tool)GUILayout.SelectionGrid((int)ed.tool, new[] { "Place", "Paint", "Fill", "Box", "Picker" }, 1, "tool"); if (tool != Edit.use.tool) { actQueue.Enqueue(new ChangeToolAct(tool)); } } GUILayout.EndVertical(); if (repaint) { boxRects.Add(GUILayoutUtility.GetLastRect()); } }
public ChangeToolAct(Edit.Tool tool) { this.tool = tool; }
public override void Do() { prevTool = Edit.use.tool; Edit.use.tool = tool; }