Esempio n. 1
0
 public ConvertToBrushesButton()
 {
     ChiselToolbarUtility.SetupToolbarElement(this, kIcon, kTooltip);
     this.clicked += OnClicked;
     ChiselSelectionManager.GeneratorSelectionUpdated += UpdateEnabledState;
     UpdateEnabledState();
 }
Esempio n. 2
0
        public static void DeactivateTool(bool selectNode = false)
        {
            if (!IsActive())
            {
                return;
            }
            // Unity has unreliable events
            ChiselGeneratorManager.GeneratorMode.OnDeactivate();
            ToolManager.RestorePreviousPersistentTool();
            if (!IsActive())
            {
                return;
            }

            if (selectNode && ChiselToolbarUtility.HaveNodesInSelection())
            {
                ChiselEditGeneratorTool.ActivateTool();
                if (!IsActive())
                {
                    return;
                }
            }

            ToolManager.RestorePreviousTool();
            if (!IsActive())
            {
                return;
            }

            Tools.current = Tool.Move;
        }
Esempio n. 3
0
 public ChiselToggle(string iconName, string tooltipName)
 {
     ChiselToolbarUtility.SetupToolbarElement(this, iconName, tooltipName);
     UpdateEnabledState();
 }
Esempio n. 4
0
 public RebuildAllButton()
 {
     ChiselToolbarUtility.SetupToolbarElement(this, kIcon, kTooltip);
     this.clicked += OnClicked;
 }
Esempio n. 5
0
 public CenterPivotOnEachNodeInSelectionButton()
 {
     ChiselToolbarUtility.SetupToolbarElement(this, kIcon, kTooltip);
     this.clicked += OnClicked;
 }