Exemplo n.º 1
0
 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());
     }
 }
Exemplo n.º 2
0
 public ChangeToolAct(Edit.Tool tool)
 {
     this.tool = tool;
 }
Exemplo n.º 3
0
 public override void Do()
 {
     prevTool      = Edit.use.tool;
     Edit.use.tool = tool;
 }