/// <summary> /// ソート項目を押したとき /// </summary> /// <param name="favoriteSort"></param> void OnClickFavoriteSortItemButton(SortDialogFavoriteSortListContext favoriteSort) { SoundUtil.PlaySE(SEID.SE_MENU_OK); SelectIndex = SortCells.IndexOf(favoriteSort); if (OnClickFavoriteSortItemButtonAction != null) { OnClickFavoriteSortItemButtonAction(favoriteSort); } }
public void SetSortType(MAINMENU_SORT_SEQ sortType, int index) { if (SortCells.IsRange(index)) { SortCells[index].SortType = sortType; SortCells[index].DetailFilterText = string.Format(GameTextUtil.GetText("filter_choice"), GameTextUtil.GetSortDialogSortText(SortCells[index].SortType)); if (SortCells[index].SortType == MAINMENU_SORT_SEQ.SEQ_INIT) { SortCells[index].IsAscOrder = true; } } }
void SetUpSortList() { SortCells.Clear(); for (int i = 0; i < 5; i++) { SortDialogFavoriteSortListContext favoriteSort = new SortDialogFavoriteSortListContext(); string textkey = string.Format("filter_text{0}", i + 44); favoriteSort.PriorityText = GameTextUtil.GetText(textkey); favoriteSort.DetailFilterTextColor = ColorUtil.COLOR_YELLOW; favoriteSort.OnClickFilterAction = OnClickFavoriteSortItemButton; favoriteSort.OnClickOrderAction = OnClickFavoriteSortOrderButton; favoriteSort.SetUpOderText(); SortCells.Add(favoriteSort); } }
public void SortCheck() { Assert.IsTrue(SystemInfo.supportsComputeShaders); System.Diagnostics.Stopwatch timer = new System.Diagnostics.Stopwatch(); timer.Start(); SortCells sort = new SortCells(); var results = sort.Sort(10000); StringBuilder builder = new StringBuilder(); foreach (var current in results) { builder.Append(current.X + ", " + current.Y + ": " + current.Rating); builder.AppendLine(); } timer.Stop(); Debug.Log(builder.ToString() + " " + timer.ElapsedMilliseconds); }