// TODO: move to dedicated manager internal static void Register(ChiselEditToolBase editMode) { if (editMode.GetType() == typeof(ChiselCreateTool)) { return; } editModes[editMode.ToolName] = editMode; }
internal static void Register(ChiselEditToolBase editMode) { if (editMode.GetType() == typeof(ChiselPlacementTool)) { return; } editModes[editMode.ToolName] = editMode; editMode.UpdateIcon(); }
static void EditModeButton(Rect position, bool enabled, ChiselEditToolBase editMode, GUIStyle style) { var editModeType = editMode.GetType(); using (new EditorGUI.DisabledScope(!enabled)) { EditorGUI.BeginChangeCheck(); var value = Toggle(position, editMode, editModeType, style); if (EditorGUI.EndChangeCheck() && value) { ToolManager.SetActiveTool(editModeType); ChiselEditorSettings.Save(); } } }