/// <summary> /// 指定したソートタイプを選択状態にする /// </summary> /// <param name="sortType"></param> public void SetUpSelected(MAINMENU_SORT_SEQ sortType, List <SortDialogFavoriteSortListContext> sortCells) { if (SortButtons.Count == 0) { SetUpSortList(); } for (int i = 0; i < SortButtons.Count; ++i) { SortButtons[i].IsSelect = (sortType == SortButtons[i].SortType); bool enabledButton = true; if (SortButtons[i].IsSelect == false && sortCells != null) { for (int j = 0; j < sortCells.Count; ++j) { if (sortCells[j].SortType == MAINMENU_SORT_SEQ.SEQ_INIT) { continue; } if (SortButtons[i].SortType == sortCells[j].SortType) { enabledButton = false; break; } } } SortButtons[i].IsButtonEnable = enabledButton; } }
/// <summary> /// ソート&フィルタ情報の設定 /// </summary> /// <param name="sortInfo"></param> public void SetUpSortData(LocalSaveSortInfo sortInfo) { m_IsTutorialSortData = false; if (sortInfo != null && sortInfo.m_SortType == (int)MAINMENU_SORT_SEQ.SEQ_INIT) { sortInfo = SortDialog.SetDefaultSortInfo(sortInfo, SortDialog.DIALOG_TYPE.UNIT); } m_unitBaseList.SetUpSortData(sortInfo); m_SortInfo = sortInfo; if (sortInfo != null) { m_SortType = (MAINMENU_SORT_SEQ)sortInfo.m_SortType; if (sortInfo.m_FavoriteSorts != null) { m_FavoriteSortTypes = new MAINMENU_SORT_SEQ[sortInfo.m_FavoriteSorts.Length]; for (int i = 0; i < sortInfo.m_FavoriteSorts.Length; i++) { m_FavoriteSortTypes[i] = (MAINMENU_SORT_SEQ)sortInfo.m_FavoriteSorts[i].m_SortType; } } m_unitBaseList.AddSortInfo(SORT_PARAM.ID, (sortInfo.m_SortIsAscOrder) ? SORT_ORDER.ASCENDING : SORT_ORDER.DESCENDING); m_unitBaseList.AddSortInfo(SORT_PARAM.LEVEL, (sortInfo.m_SortIsAscOrder) ? SORT_ORDER.ASCENDING : SORT_ORDER.DESCENDING); } m_unitBaseList.AddSortInfo(SORT_PARAM.UNIQUE_ID, SORT_ORDER.ASCENDING); }
/// <summary> /// ステータス表示の設定 /// </summary> /// <param name="item"></param> /// <param name="sortType"></param> public void SetStatus(MAINMENU_SORT_SEQ sortType, MAINMENU_SORT_SEQ[] favoriteSortTypes) { if (CharaMasterData == null) { return; } if (UnitData == null) { return; } if (StatusTextList == null) { StatusTextList = new List <string>(); } else { StatusTextList.Clear(); } //----------------------------------------- // テキストの追加 //----------------------------------------- if (sortType != MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FAVORITE_SORT) { // 通常ソート AddStatusText(sortType); } else { // お好みソート if (favoriteSortTypes != null) { for (int i = 0; i < favoriteSortTypes.Length; i++) { AddStatusText(favoriteSortTypes[i]); } } } if (StatusTextList.Count == 0) { // 取得できなかった場合はとりあえずレベルにする AddStatusText(MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LEVEL); } if (StatusTextList.Count > 0) { StatusText = StatusTextList[0]; } else { StatusText = ""; } }
public void SelectStatusDisplayType(MAINMENU_SORT_SEQ sortType, MAINMENU_SORT_SEQ[] favoriteSortTypes) { m_SwitchStatusCount = 0; m_SwitchStatusUpdateTime = 0; for (int i = 0; i < m_unitViewModels.Count; i++) { var viewModel = m_unitViewModels[i]; viewModel.SetStatus(sortType, favoriteSortTypes); } }
void AddSortData(MAINMENU_SORT_SEQ sortType) { SortDialogTextButtonListContext sortButton = new SortDialogTextButtonListContext(); sortButton.SortType = sortType; sortButton.OffNameText = GameTextUtil.GetSortDialogSortText(sortType); sortButton.OnNameText = string.Format(GameTextUtil.GetText("filter_choice"), GameTextUtil.GetSortDialogSortText(sortType)); sortButton.OffTextColor = ColorUtil.COLOR_WHITE; sortButton.OnTextColor = ColorUtil.COLOR_YELLOW; sortButton.DidSelectItem = OnClickSortButton; SortButtons.Add(sortButton); }
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; } } }
/// <summary> /// ソートの種別表示の設定 /// </summary> /// <param name="sortInfo"></param> void SetStatusType(LocalSaveSortInfo sortInfo) { StatusTypeText = ""; if (sortInfo != null) { MAINMENU_SORT_SEQ sortType = (MAINMENU_SORT_SEQ)sortInfo.m_SortType; if (sortType == MAINMENU_SORT_SEQ.SEQ_INIT) { StatusTypeText = GameTextUtil.GetText("filter_text18"); } else { StatusTypeText = GameTextUtil.GetSortDialogSortText(sortType); } StatusTypeText = string.Format(GameTextUtil.GetText("sort_colorset"), StatusTypeText); // カラーコード設定 } }
/// <summary> /// ソートの種別表示の設定 /// </summary> /// <param name="item"></param> /// <param name="sortType"></param> void SetStatusType(MAINMENU_SORT_SEQ sortType, MAINMENU_SORT_SEQ[] favoriteSortTypes) { if (TutorialManager.IsExists && m_IsTutorialSortData == true) { StatusTypeText = GameTextUtil.GetText("tutorial_sort_items01"); } else { if (sortType == MAINMENU_SORT_SEQ.SEQ_INIT) { StatusTypeText = GameTextUtil.GetText("filter_text18"); } else { StatusTypeText = GameTextUtil.GetSortDialogSortText(sortType); } } StatusTypeText = string.Format(GameTextUtil.GetText("sort_colorset"), StatusTypeText); // カラーコード設定 }
public void UpdateData(LocalSaveSortInfo sortInfo) { if (sortInfo != null) { for (int i = 0; i < SortCells.Count; i++) { MAINMENU_SORT_SEQ sortType = MAINMENU_SORT_SEQ.SEQ_INIT; bool isAscOrder = true; if (sortInfo != null && sortInfo.m_FavoriteSorts != null) { if (sortInfo.m_FavoriteSorts.Length > i) { sortType = (MAINMENU_SORT_SEQ)sortInfo.m_FavoriteSorts[i].m_SortType; isAscOrder = sortInfo.m_FavoriteSorts[i].m_IsAscOrder; } } SetSortType(sortType, i); SortCells[i].IsAscOrder = isAscOrder; } IsOnUsePriority = sortInfo.m_FavoriteSortIsUsePriority; } }
/// <summary> /// アイコン下部のステータスを表示するタイプを設定する /// </summary> /// <param name="sortType">ソートタイプ</param> /// <returns></returns> public void SelectStatusDisplayType(MAINMENU_SORT_SEQ sortType, MAINMENU_SORT_SEQ[] favoriteSortTypes) { m_unitGridView.SelectStatusDisplayType(sortType, favoriteSortTypes); }
/// <summary> /// ソート項目のテキストを取得 /// </summary> /// <param name="sortType"></param> /// <returns></returns> public static string GetSortText(MAINMENU_SORT_SEQ sortType) { return(GameTextUtil.GetText(GameTextUtil.GetSortToTextKey(sortType))); }
/// <summary> /// ダイアログのソートボタンが押されたとき /// </summary> /// <param name="sortType"></param> public void OnClickSortItem(MAINMENU_SORT_SEQ sortType) { }
void OnClickSort(MAINMENU_SORT_SEQ sortType) { }
/// <summary> /// ソート項目のテキストを取得 /// </summary> /// <param name="sortType"></param> /// <returns></returns> public static string GetSortDialogSortText(MAINMENU_SORT_SEQ sortType) { string textkey = ""; switch (sortType) { case MAINMENU_SORT_SEQ.SEQ_INIT: textkey = "filter_text49"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FILTER: textkey = "filter_text17"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ATTACK: textkey = "filter_text12"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FAVORITE: textkey = "filter_text4"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_COST: textkey = "filter_text6"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_HP: textkey = "filter_text11"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ELEMENT: textkey = "filter_text8"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ID: textkey = "filter_text13"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_GET: textkey = "filter_text5"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_KIND: textkey = "filter_text9"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_PLUS: textkey = "filter_text16"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_DEFAULT: textkey = "filter_text18"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LOGIN_TIME: textkey = "filter_text53"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RANK: textkey = "filter_text52"; break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_WAIT_HIM: // textkey = ""; // break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_WAIT_ME: // textkey = ""; // break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LEVEL: textkey = "filter_text10"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RARE: textkey = "filter_text7"; break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_CLEAR: // textkey = ""; // break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_CHALLENGING: // textkey = ""; // break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_ACQUIRED: // textkey = ""; // break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LIMIT_OVER: textkey = "filter_text14"; break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_GP_GET_REWARD: // textkey = ""; // break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_GP_NEW: // textkey = ""; // break; //case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_GP_ACQUIRED: // textkey = ""; // break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_CHARM: textkey = "filter_text15"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FAVORITE_SORT: textkey = "filter_text17"; break; } return(GameTextUtil.GetText(textkey)); }
/// <summary> /// ソート項目のテキストキーを取得 /// </summary> /// <param name="sortType">ソートタイプ</param> /// <returns>対応したゲームテキストキー</returns> public static string GetSortToTextKey(MAINMENU_SORT_SEQ sortType) { string strSortTypeKey = ""; switch (sortType) { case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FILTER: strSortTypeKey = "SORT_TYPE_FILTER"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ATTACK: strSortTypeKey = "SORT_TYPE_ATK"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_COST: strSortTypeKey = "WORD_COST"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ELEMENT: strSortTypeKey = "SORT_TYPE_ELEMENT"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_HP: strSortTypeKey = "SORT_TYPE_HP"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ID: strSortTypeKey = "SORT_TYPE_ID"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_GET: strSortTypeKey = "SORT_TYPE_GET"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_KIND: strSortTypeKey = "SORT_TYPE_KIND"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_PLUS: strSortTypeKey = "SORT_TYPE_PLUS"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_DEFAULT: strSortTypeKey = "SORT_TYPE_DEFAULT"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LOGIN_TIME: strSortTypeKey = "SORT_TYPE_LOGIN_TIME"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RANK: strSortTypeKey = "SORT_TYPE_RANK"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_WAIT_HIM: strSortTypeKey = "SORT_TYPE_WAIT_HIM"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_WAIT_ME: strSortTypeKey = "SORT_TYPE_WAIT_ME"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FAVORITE: strSortTypeKey = "SORT_TYPE_FAVORITE"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LEVEL: strSortTypeKey = "SORT_TYPE_LEVEL"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RARE: strSortTypeKey = "SORT_TYPE_RARE"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_CLEAR: strSortTypeKey = "SORT_TYPE_MISSION_CLEAR"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_CHALLENGING: strSortTypeKey = "SORT_TYPE_MISSION_CHALLENGING"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_ACQUIRED: strSortTypeKey = "SORT_TYPE_MISSION_ACQUIRED"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LIMIT_OVER: strSortTypeKey = "SORT_TYPE_LIMIT_OVER"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_GP_GET_REWARD: strSortTypeKey = "SORT_TYPE_MISSION_GP_GET_REWARD"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_GP_NEW: strSortTypeKey = "SORT_TYPE_MISSION_GP_NEW"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_MISSION_GP_ACQUIRED: strSortTypeKey = "SORT_TYPE_MISSION_GP_CLEAR"; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_CHARM: strSortTypeKey = "SORT_TYPE_CHARM"; break; } return(strSortTypeKey); }
/// <summary> /// ステータスの設定:テキストリストの追加 /// </summary> /// <param name="sortType"></param> void AddStatusText(MAINMENU_SORT_SEQ sortType) { switch (sortType) { case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_COST: StatusTextList.Add(UnitParam.cost.ToString()); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RARE: StatusTextList.Add(GameTextUtil.GetSortDialogRareText(CharaMasterData.rare)); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_KIND: StatusTextList.Add(GameTextUtil.GetSortDialogKindText(CharaMasterData.kind)); if (CharaMasterData.sub_kind == MasterDataDefineLabel.KindType.NONE) { StatusTextList.Add(GameTextUtil.GetSortDialogKindText(CharaMasterData.kind)); } else { StatusTextList.Add(GameTextUtil.GetSortDialogKindText(CharaMasterData.sub_kind)); } break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_HP: StatusTextList.Add(UnitParam.hp.ToString()); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ATTACK: StatusTextList.Add(UnitParam.pow.ToString()); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ID: StatusTextList.Add(string.Format(GameTextUtil.GetText("unit_status1"), CharaMasterData.draw_id)); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LIMIT_OVER: StatusTextList.Add(UnitData.limitover_lv.ToString()); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_CHARM: StatusTextList.Add(string.Format("{0:0.0}", UnitParam.charm)); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_PLUS: StatusTextList.Add(string.Format("{0}", UnitData.add_hp + UnitData.add_pow)); break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LEVEL: if (CharaMasterData != null) { if (UnitData.level >= CharaMasterData.level_max) { StatusTextList.Add(unit_status18); } else { StatusTextList.Add(UnitData.level.ToString()); } } else { StatusTextList.Add(UnitData.level.ToString()); } break; } }
/// <summary> /// ソートタイプの変換 /// </summary> /// <param name="sortType"></param> /// <returns></returns> public static SORT_PARAM GetSortParam(MAINMENU_SORT_SEQ sortType) { SORT_PARAM sortParam = SORT_PARAM.NONE; switch (sortType) { case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ATTACK: sortParam = SORT_PARAM.POW; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_FAVORITE: sortParam = SORT_PARAM.FAVORITE; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_COST: sortParam = SORT_PARAM.COST; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_HP: sortParam = SORT_PARAM.HP; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ELEMENT: sortParam = SORT_PARAM.ELEMENT; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_ID: sortParam = SORT_PARAM.ID; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_GET: sortParam = SORT_PARAM.GET_TIME; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_KIND: sortParam = SORT_PARAM.KIND; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_PLUS: sortParam = SORT_PARAM.PLUS; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LOGIN_TIME: sortParam = SORT_PARAM.LOGIN_TIME; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RANK: sortParam = SORT_PARAM.RANK; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LEVEL: sortParam = SORT_PARAM.LEVEL; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_RARE: sortParam = SORT_PARAM.RARITY; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_LIMIT_OVER: sortParam = SORT_PARAM.LIMMIT_OVER; break; case MAINMENU_SORT_SEQ.SEQ_SORT_TYPE_CHARM: sortParam = SORT_PARAM.CHARM; break; default: #if BUILD_TYPE_DEBUG Debug.LogError("SortType NG!! - " + sortType); #endif break; } return(sortParam); }