public void ActivateSort() { trelloBoardManager.ActivateResort(); SetUpSorter(); for (int i = 0; i < listSortModifiers.Length; i++) { listSortModifiers[i].ActivateSortMode(); listSortModifiers[i].meshRenderer.material = sortMaterials[i]; BoardColumnSortModifier columnSortModifier = listSortModifiers[i]; BoardColumn boardColumn = columnSortModifier.boardColumn; boardColumn.dictationNoteColumn.SetActive(false); string listId = boardColumn.list.id; listIdsOfColumns[i] = listId; NoteSortModifier[] noteSortModifiersOfList = boardColumn.GetComponentsInChildren <NoteSortModifier>(); for (int j = 0; j < noteSortModifiersOfList.Length; j++) { NoteSortModifier noteSortModifier = noteSortModifiersOfList[j]; noteSortModifier.enabled = true; if (defaultCellMaterial == null) { defaultCellMaterial = noteSortModifier.meshRenderer.material; } noteSortModifiers.Add(noteSortModifier); noteSortModifier.sorter = this; cardIdWithListId.Add(noteSortModifier.note.cardId, listId); noteSortModifier.meshRenderer.material = sortMaterials[i]; } } SetActiveColumn(0); }
public void DeactivateSort() { trelloBoardManager.DeactivateResort(); for (int i = 0; i < listSortModifiers.Length; i++) { BoardColumnSortModifier columnSortModifier = listSortModifiers[i]; columnSortModifier.DeactivateSortMode(); columnSortModifier.meshRenderer.material = defaultColumnMaterial; columnSortModifier.boardColumn.dictationNoteColumn.SetActive(true); columnSortModifier.enabled = false; } foreach (NoteSortModifier card in noteSortModifiers) { card.meshRenderer.material = defaultCellMaterial; card.enabled = false; } foreach (KeyValuePair <string, string> changedCardPair in changedCardIdWithListId) { WebManager.Instance.Trello.Writer.SendReorderedCardToTrello(changedCardPair.Key, changedCardPair.Value); } CursorFeedback.Instance.ToggleSortModeFeedback(null); }
public void ClickedList(BoardColumnSortModifier columnSortModifier) { int index = System.Array.IndexOf(listSortModifiers, columnSortModifier); SetActiveColumn(index); }