DressUpFightView.cs 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510
  1. using UI.DressUp;
  2. using FairyGUI;
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. using System;
  6. using ET;
  7. using System.Collections;
  8. namespace GFGGame
  9. {
  10. public class DressUpFightType
  11. {
  12. public int levelID;
  13. public int teaPartID;
  14. }
  15. public class DressUpFightView : BaseView
  16. {
  17. private UI_DressUpFightUI _ui;
  18. private int _fightID;
  19. private int _levelID;
  20. private int _TeaPartyID;
  21. private float listType1X = 0;
  22. private float partsListX = 0;
  23. private float partsListScrollingPosY = 0;
  24. private DressUpListType currentListType;
  25. private int[] _currentList2;
  26. private GameObject _scenePrefab;
  27. private GameObject _sceneObject;
  28. private List<int> _currentList3 = new List<int>();
  29. private List<int> _currentList4 = new List<int>();
  30. private int _currentMenuType;
  31. private int _currentSuitId;
  32. private StoryLevelCfg _levelCfg;
  33. private StoryFightCfg _fightCfg;
  34. private int scoreType = 0; //目标分数类型保存
  35. private bool _IsTeaPart = false;
  36. private const int SORT_BY_HIGH_SCORE = 0;
  37. private const int SORT_BY_LOW_SCORE = 1;
  38. private int _scoreIndex = SORT_BY_HIGH_SCORE;
  39. private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
  40. public override void Dispose()
  41. {
  42. if (_sceneObject != null)
  43. {
  44. GameObject.Destroy(_sceneObject);
  45. _sceneObject = null;
  46. }
  47. for (int i = 0; i < _listLongPress.Count; i++)
  48. {
  49. _listLongPress[i].Dispose();
  50. }
  51. if (_ui != null)
  52. {
  53. _ui.Dispose();
  54. _ui = null;
  55. }
  56. base.Dispose();
  57. }
  58. protected override void OnInit()
  59. {
  60. base.OnInit();
  61. packageName = UI_DressUpFightUI.PACKAGE_NAME;
  62. _ui = UI_DressUpFightUI.Create();
  63. viewCom = _ui.target;
  64. isfullScreen = true;
  65. _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneDressUpFight"));
  66. _ui.m_btnClose.width = GRoot.inst.width;
  67. _ui.m_btnClose.height = GRoot.inst.height;
  68. _ui.m_btnClose.AddRelation(GRoot.inst, RelationType.Size);
  69. _ui.m_btnLastStep.visible = true;
  70. _ui.m_btnNextStep.visible = true;
  71. _ui.m_btnClose.visible = false;
  72. _ui.m_grpTips.visible = false;
  73. _ui.m_btnRepeal.visible = false;
  74. _ui.m_btnRenewal.visible = false;
  75. _ui.m_btnSearch.visible = true;
  76. // _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
  77. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  78. _ui.m_partsListSearch.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  79. InitLists();
  80. _ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
  81. _ui.m_partsListSearch.m_comboBoxRarity.onChanged.Add(OnSearchComboBoxRarityChanged);
  82. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  83. _ui.m_btnHome.onClick.Add(OnClickBtnHome);
  84. // _ui.m_btnClothingShop.onClick.Add(OnClickBtnClothingShop);
  85. // _ui.m_comboBox.onChanged.Add(OnComboBoxChanged);
  86. _ui.m_comListType1.m_listType.onClickItem.Add(OnClickListType1Item);
  87. _ui.m_comListType2.m_listType.onClickItem.Add(OnClickListType2Item);
  88. _ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
  89. _ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
  90. _ui.m_partsListSearch.m_list.onClickItem.Add(OnClickSearchPartsListItem);
  91. _ui.m_touchPad.onClick.Add(OnTouchPad);
  92. _ui.m_btnHint.onClick.Add(OnClickBtnHint);
  93. // _ui.m_btnGuide.onClick.Add(OnTouchPad);
  94. _ui.m_btnClose.onClick.Add(OnClickBtnClose);
  95. _ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
  96. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  97. _ui.m_btnRecommend.onClick.Add(OnClickBtnRecommend);
  98. _ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
  99. _ui.m_btnAutoPlay.onClick.Add(OnClickBtnAutoPlay);
  100. _ui.m_btnLastStep.onClick.Add(OnClickBtnLastStep);
  101. _ui.m_btnNextStep.onClick.Add(OnClickBtnNextStep);
  102. _ui.m_btnSubmission.onClick.Add(OnClickBtnSubmission);
  103. _ui.m_compNeed.target.onClick.Add(OnClickComNeed);
  104. _ui.m_compNeed.m_listTag.itemRenderer = RenderListTagItem;
  105. // _ui.m_btnShow.onClick.Add(OnClickBtnShow);
  106. // _ui.m_btnHide.onClick.Add(OnClickBtnHide);
  107. // _ui.m_loaShow.onClick.Add(OnClickLoaShow);
  108. // _ui.m_btnHide.visible = false;
  109. // EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdatePartsListSort);
  110. _ui.m_partsList2.m_comboBoxRarity.visible = false;
  111. _ui.m_partsList2.m_imgTop.visible = true;
  112. _ui.m_partsList.m_imgTop.visible = false;
  113. }
  114. protected override void AddEventListener()
  115. {
  116. base.AddEventListener();
  117. EventAgent.AddEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  118. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  119. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  120. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  121. EventAgent.AddEventListener(ConstMessage.TEA_PARTY_STATU, TeaPartyStatuChange);
  122. // EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  123. }
  124. protected override void RemoveEventListener()
  125. {
  126. base.RemoveEventListener();
  127. EventAgent.RemoveEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  128. EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  129. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  130. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  131. EventAgent.RemoveEventListener(ConstMessage.TEA_PARTY_STATU, TeaPartyStatuChange);
  132. // EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  133. }
  134. protected override void OnShown()
  135. {
  136. base.OnShown();
  137. var objData = (DressUpFightType)this.viewData;
  138. if (objData.teaPartID > 0) {
  139. _IsTeaPart = true;
  140. _TeaPartyID = objData.teaPartID;
  141. }
  142. else
  143. _IsTeaPart = false;
  144. _levelID = objData.levelID;
  145. if (!_IsTeaPart)
  146. _ui.m_c1.selectedIndex = 0;
  147. else
  148. _ui.m_c1.selectedIndex = 2;
  149. _ui.m_loaGuide.visible = true;
  150. InstanceZonesDataManager.usedRecommend = false;
  151. // _ui.m_comboBox.title = "我的套装";
  152. _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
  153. _ui.m_txtRecommendCount.SetVar("v2", GlobalCfgArray.globalCfg.recommendCount.ToString()).FlushVars();
  154. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  155. _ui.m_btnAutoPlay.selected = FightDataManager.Instance.autoPlay;
  156. _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
  157. _ui.m_btnRecommend.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
  158. if (!_IsTeaPart) {
  159. InstanceZonesDataManager.currentLevelCfgId = _levelID;
  160. _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  161. _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
  162. if (_levelCfg.type == ConstInstanceZonesType.Field)
  163. {
  164. scoreType = FieldDataManager.Instance.fieldInfos.theme;
  165. _ui.m_btnAutoPlay.visible = false;
  166. }
  167. else {
  168. scoreType = _fightCfg.scoreType;
  169. }
  170. InstanceZonesDataManager.FightScene = _levelCfg.type;
  171. _ui.m_compNeed.target.visible = _fightCfg.needItemId > 0 || _fightCfg.needSuitId > 0 || _fightCfg.needTagsArr.Length > 0;
  172. if (_ui.m_compNeed.target.visible)
  173. {
  174. _ui.m_compNeed.m_c1.selectedIndex = 0;
  175. if (_fightCfg.needItemId > 0)
  176. {
  177. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetItemName(_fightCfg.needItemId);
  178. _ui.m_compNeed.target.data = _fightCfg.needItemId;
  179. _ui.m_compNeed.m_imgGot.visible = ItemDataManager.GetItemNum(_fightCfg.needItemId) > 0;
  180. }
  181. else if (_fightCfg.needSuitId > 0)
  182. {
  183. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetSuitName(_fightCfg.needSuitId);
  184. _ui.m_compNeed.target.data = _fightCfg.needSuitId;
  185. _ui.m_compNeed.m_imgGot.visible = DressUpMenuSuitDataManager.CheckHaveSuit(_fightCfg.needSuitId);
  186. }
  187. else
  188. {
  189. _ui.m_compNeed.m_c1.selectedIndex = 1;
  190. _ui.m_compNeed.m_listTag.numItems = _fightCfg.needTagsArr.Length;
  191. _ui.m_compNeed.m_imgGot.visible = false;
  192. }
  193. }
  194. }
  195. InstanceZonesDataManager.currentScoreType = scoreType;
  196. //一级菜单
  197. _ui.m_comListType1.m_listType.RemoveChildrenToPool();
  198. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
  199. //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_listType1.numItems);
  200. float maxHeight = _ui.target.height - _ui.m_comListType1.m_listType.y - DressUpView.BOTTOM_BLANK;
  201. if (_ui.m_comListType1.m_listType.height > maxHeight)
  202. {
  203. _ui.m_comListType1.m_listType.height = maxHeight;
  204. }
  205. _ui.m_comListType1.target.x = _ui.target.width;
  206. _ui.m_comListType2.target.x = _ui.target.width;
  207. _ui.m_partsList.target.x = _ui.target.width;
  208. _ui.m_partsList2.target.x = _ui.target.width;
  209. _ui.m_partsListSearch.target.x = _ui.target.width;
  210. _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
  211. this.showListType1();
  212. if (_sceneObject == null)
  213. {
  214. _sceneObject = GameObject.Instantiate(_scenePrefab);
  215. MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false);
  216. MyDressUpHelper.dressUpObj.PutOnDefaultDressUpData(_IsTeaPart);
  217. }
  218. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  219. UpdateStepBtn(true);
  220. UpdateScore();
  221. if (!_IsTeaPart)
  222. SendLog();
  223. else
  224. {
  225. var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
  226. _ui.m_txtTeaPartyName.text = teapartyRoleCfg[objData.teaPartID - 1].name;
  227. }
  228. Timers.inst.AddUpdate(CheckGuide);
  229. TeaPartyStatuChange();
  230. }
  231. protected override void OnHide()
  232. {
  233. base.OnHide();
  234. _ui.m_btnClose.visible = false;
  235. _ui.m_grpTips.visible = false;
  236. if (_sceneObject != null)
  237. {
  238. GameObject.Destroy(_sceneObject);
  239. _sceneObject = null;
  240. }
  241. _fightCfg = null;
  242. _levelCfg = null;
  243. DressUpMenuItemDataManager.Clear();
  244. MyDressUpHelper.ResetMemory();
  245. Timers.inst.Remove(CheckGuide);
  246. }
  247. private void OnClickBtnLastStep()
  248. {
  249. if (!MyDressUpHelper.OnClickBtnLastStep()) return;
  250. UpdateStepBtn(false);
  251. }
  252. private void OnClickBtnNextStep()
  253. {
  254. if (!MyDressUpHelper.OnClickBtnNextStep()) return;
  255. UpdateStepBtn(false);
  256. }
  257. //茶话会提交搭配
  258. private void OnClickBtnSubmission()
  259. {
  260. ChangeTeapartyDressup();
  261. }
  262. private async void ChangeTeapartyDressup()
  263. {
  264. DressUpData dressUpData = MyDressUpHelper.dressUpObj.DressUpDataClone();
  265. bool result = await LeagueSproxy.ChangeTeapartyDressup(RoleDataManager.roleId, _TeaPartyID, dressUpData.itemList);
  266. if (result)
  267. {
  268. backView();
  269. }
  270. }
  271. private void backView()
  272. {
  273. if (_IsTeaPart)
  274. {
  275. ViewManager.Show<LeagueTeaPartyView>();
  276. }
  277. else if (_levelCfg.type == ConstInstanceZonesType.Studio && _levelCfg.subType != ConstInstanceZonesSubType.Hard3)
  278. {
  279. ViewManager.Show(StudioDataManager.Instance.VIEW_NAME, StudioDataManager.Instance.PROPERTY_SELECT_INDEX, ViewManager.GetGoBackDatas(StudioDataManager.Instance.VIEW_NAME));
  280. }
  281. else if (_levelCfg.type == ConstInstanceZonesType.Studio && _levelCfg.subType == ConstInstanceZonesSubType.Hard3)
  282. {
  283. if (StudioDataManager.Instance.IsluckyBoxFilingChapter())
  284. {
  285. ViewManager.Show<StudioFilingView>(StudioDataManager.Instance.luckyBoxFilingChapterId, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName));
  286. }
  287. else
  288. {
  289. ViewManager.Show<StudioFilingView>(null, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName));
  290. }
  291. }
  292. else if (_levelCfg.type == ConstInstanceZonesType.Field)
  293. {
  294. ViewManager.GoBackFrom(typeof(DressUpFightView).FullName);
  295. }
  296. else
  297. {
  298. //ViewManager.GoBackFrom(typeof(StoryChapterView).FullName);
  299. ViewManager.Show<StoryChapterView>(_levelCfg.chapterId);//, new object[] { typeof(StoryChapterListView).FullName}
  300. }
  301. //MyDressUpHelper.dressUpObj.TakeOffAll();
  302. this.Hide();
  303. }
  304. private void OnClickBtnBack()
  305. {
  306. if (!_IsTeaPart) {
  307. AlertUI.Show("是否确定退出?")
  308. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  309. {
  310. backView();
  311. });
  312. }
  313. else {
  314. AlertUI.Show("当期搭配未保存,是否放弃提交搭配?")
  315. .SetLeftButton(true, "放弃搭配", (object data) =>
  316. {
  317. backView();
  318. }).SetRightButton(true, "提交搭配", (object data) =>
  319. {
  320. ChangeTeapartyDressup();
  321. });
  322. }
  323. //ViewManager.Show<StoryChapterView>(StoryDataManager.currentChapter);
  324. }
  325. private void OnClickBtnHome()
  326. {
  327. AlertUI.Show("是否返回?")
  328. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  329. {
  330. //MyDressUpHelper.dressUpObj.TakeOffAll();
  331. GameController.GoBackToMainView();
  332. });
  333. }
  334. private void OnClickBtnClothingShop()
  335. {
  336. ViewManager.Show<ClothingShopView>(new object[] { null, scoreType }, null, false, true);
  337. }
  338. private void OnClickListType1Item(EventContext context)
  339. {
  340. // GuideController.HideGuide();
  341. GObject typeItem = context.data as GObject;
  342. int order = (int)typeItem.data;
  343. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[order - 1];
  344. if (item1.subMenusArr.Length > 0)
  345. {
  346. this.showListType2(item1.subMenusArr);
  347. }
  348. else
  349. {
  350. if (this.showListParts(item1.type) == false)
  351. {
  352. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  353. return;
  354. }
  355. this.showListParts(item1.type);
  356. }
  357. this.hideListType1();
  358. UpdateListPartsSelected();
  359. }
  360. private void OnClickListType2Item(EventContext context)
  361. {
  362. GObject typeItem = context.data as GObject;
  363. int order = (int)typeItem.data;
  364. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
  365. if (this.showListParts(item2.type) == false)
  366. {
  367. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  368. return;
  369. }
  370. this.hideListType2();
  371. }
  372. private void OnClickSearchPartsListItem(EventContext context)
  373. {
  374. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  375. {
  376. return;
  377. }
  378. GObject listItem = context.data as GObject;
  379. int id = (int)listItem.data;
  380. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  381. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  382. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  383. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  384. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  385. {
  386. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  387. return;
  388. }
  389. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  390. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  391. UpdateStepBtn(true);
  392. // UpdateSearchListPartsSelected();
  393. UpdateScore();
  394. }
  395. private void OnClickPartsListItem(EventContext context)
  396. {
  397. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  398. {
  399. return;
  400. }
  401. GObject listItem = context.data as GObject;
  402. int id = (int)listItem.data;
  403. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  404. {
  405. partsListScrollingPosY = _ui.m_partsList.m_list.scrollPane.scrollingPosY;
  406. this.showListParts2(id);
  407. this.hideListParts();
  408. MyDressUpHelper.dressUpObj.PutOnItemList(MyDressUpHelper.GetSuitFightItems(id));
  409. UpdateStepBtn(true);
  410. // MyDressUpHelper.dressUpObj.PutOnSuitCfg(id, false);
  411. }
  412. else
  413. {
  414. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  415. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  416. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  417. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  418. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  419. {
  420. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  421. return;
  422. }
  423. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  424. UpdateStepBtn(true);
  425. }
  426. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  427. // UpdateListPartsSelected();
  428. // UpdateListSuitPartsSelected();
  429. UpdateScore();
  430. }
  431. private void OnClickSuitPartsListItem(EventContext context)
  432. {
  433. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  434. {
  435. return;
  436. }
  437. GObject listItem = (GObject)context.data as GObject;
  438. int id = (int)listItem.data;
  439. bool isOrnament = DressUpMenuItemCfg1Array.Instance.CheckIsOrnamentsType(id);
  440. bool isDress = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  441. bool isHasSame = MyDressUpHelper.dressUpObj.CheckSameTypeIsOn(id);
  442. bool isMaxCount = MyDressUpHelper.GetCurrentOrnamentCount() >= GlobalCfgArray.globalCfg.dressLimitCount;
  443. if (isOrnament && !isDress && !isHasSame && isMaxCount)
  444. {
  445. PromptController.Instance.ShowFloatTextPrompt("饰品穿戴数量已达上限");
  446. return;
  447. }
  448. if (!DressUpMenuItemDataManager.CheckHasItem(id))
  449. {
  450. PromptController.Instance.ShowFloatTextPrompt("还未获得这件装扮");
  451. return;
  452. }
  453. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  454. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  455. UpdateStepBtn(true);
  456. // UpdateListSuitPartsSelected();
  457. UpdateScore();
  458. }
  459. private void UpdateStepBtn(bool isAdd, int suitId = 0)
  460. {
  461. if (isAdd)
  462. {
  463. MyDressUpHelper.AddMemoryDressup();
  464. }
  465. _ui.m_btnLastStep.enabled = MyDressUpHelper.stepIndex > 0;
  466. _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.dressMemory.Count - 1;
  467. UpdateListPartsSelected();
  468. UpdateListSuitPartsSelected();
  469. }
  470. private void OnLongPress(EventContext context)
  471. {
  472. LongPressGesture gesture = (LongPressGesture)context.sender;
  473. int itemId = (int)gesture.host.data;
  474. GoodsItemTipsController.ShowItemTips(itemId);
  475. }
  476. private void OnTouchPad()
  477. {
  478. if (this.currentListType == DressUpListType.List4)
  479. {
  480. this.hideListParts2();
  481. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  482. }
  483. else if (this.currentListType == DressUpListType.List3)
  484. {
  485. if (_currentList2 != null)
  486. {
  487. this.showListType2(_currentList2);
  488. }
  489. else
  490. {
  491. this.showListType1();
  492. }
  493. this.hideListParts();
  494. }
  495. else if (this.currentListType == DressUpListType.List2)
  496. {
  497. this.showListType1();
  498. this.hideListType2();
  499. }
  500. else if (this.currentListType == DressUpListType.List5)
  501. {
  502. this.showListType1();
  503. this.hideSearchListType();
  504. }
  505. }
  506. private void OnClickBtnHint()
  507. {
  508. this.ShowTaskHint();
  509. }
  510. private void OnClickBtnDelete()
  511. {
  512. MyDressUpHelper.dressUpObj.TakeOffAll();
  513. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  514. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  515. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  516. UpdateStepBtn(true);
  517. // UpdateListPartsSelected();
  518. // UpdateListSuitPartsSelected();
  519. }
  520. private void OnClickBtnClose()
  521. {
  522. _ui.m_btnClose.visible = false;
  523. _ui.m_grpTips.visible = false;
  524. }
  525. private void OnClickBtnNext()
  526. {
  527. // if (!MyDressUpHelper.CheckPutOnFinish())
  528. // {
  529. // AlertUI.Show("只有换好衣服才能出门哦!")
  530. // .SetRightButton(true, "好的");
  531. // return;
  532. // }
  533. if (!CheckHasNeed())
  534. {
  535. AlertUI.Show("未穿戴必需品。").SetRightButton(true, "好的");
  536. return;
  537. }
  538. var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  539. if (RoleDataManager.power < levelCfg.power)
  540. {
  541. ItemUtil.AddPower(OnClickBtnPhotograph);
  542. return;
  543. }
  544. OnClickBtnPhotograph();
  545. }
  546. private bool CheckHasNeed()
  547. {
  548. int _suitId = MyDressUpHelper.dressUpObj.suitId;
  549. bool isNoSuit = _fightCfg.needSuitId > 0 && _suitId != _fightCfg.needSuitId;//需要套装但未穿套装
  550. bool isDressUpItem = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(_fightCfg.needItemId);
  551. bool isIncludeItem = _suitId > 0 && Array.IndexOf(SuitCfgArray.Instance.GetCfg(_suitId).partsArr, _fightCfg.needItemId) >= 0;
  552. bool isNoItem = _fightCfg.needItemId > 0 && !isDressUpItem && !isIncludeItem;
  553. if (isNoSuit || isNoItem)
  554. {
  555. return false;
  556. }
  557. return true;
  558. }
  559. private void OnClickBtnPhotograph()
  560. {
  561. Timers.inst.StartCoroutine(ScreenShotTex());
  562. }
  563. private IEnumerator ScreenShotTex()
  564. {
  565. GameObject Role = _sceneObject.transform.Find("Role").gameObject;
  566. GameObject CopyRoleParent = _sceneObject.transform.Find("CopyRole").gameObject;
  567. Transform CopyRole = CopyRoleParent.transform.Find("Role");
  568. if (CopyRole != null)
  569. {
  570. GameObject.DestroyImmediate(CopyRole.gameObject);
  571. }
  572. Transform transform = GameObject.Instantiate(Role, CopyRoleParent.transform.position, Quaternion.identity).transform;//实例化物体
  573. transform.parent = CopyRoleParent.transform;
  574. transform.name = "Role";
  575. GameObject gameObject = _sceneObject.transform.Find("FightCamera").gameObject;
  576. Camera camera = gameObject.GetComponent<Camera>();
  577. FightDataManager.Instance.RoleTextuex = FightDataManager.Instance.GetPrintscreenNTexture(camera);
  578. yield return new WaitForEndOfFrame();
  579. if (CardDataManager.GetCardListByRoleType(0).Count > 0)
  580. {
  581. ViewManager.Show<StoryCardChoose>(scoreType);
  582. }
  583. else
  584. {
  585. StartCalculateScore();
  586. }
  587. }
  588. private void StartCalculateScore()
  589. {
  590. //不可移动代码位置
  591. bool hasFightTarget = _fightCfg.targetName != null && _fightCfg.targetName.Length > 0;
  592. if (_levelCfg.type == ConstInstanceZonesType.Field)
  593. {
  594. FieldFightDataManager.Instance.CurrentCardId = InstanceZonesDataManager.currentCardId;
  595. FieldFightDataManager.Instance.CurrentScoreType = InstanceZonesDataManager.currentScoreType;
  596. FieldFightDataManager.Instance.currentLevelCfgId = InstanceZonesDataManager.currentLevelCfgId;
  597. }
  598. if (hasFightTarget)
  599. {
  600. ViewManager.Show<StoryFightTargetView>();
  601. }
  602. else
  603. {
  604. ViewManager.Show<StoryFightSingleView>();
  605. }
  606. this.Hide();
  607. }
  608. private void OnClickBtnRecommend()
  609. {
  610. if (this.currentListType == DressUpListType.List4)
  611. {
  612. this.hideListParts2();
  613. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  614. }
  615. InstanceZonesDataManager.usedRecommend = true;
  616. // MyDressUpHelper.PutOnRecommendItems();
  617. MyDressUpHelper.PutOnRecommendItems2();
  618. _ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
  619. UpdateStepBtn(true);
  620. // UpdateListPartsSelected();
  621. // UpdateListSuitPartsSelected();
  622. UpdateScore();
  623. if (!CheckHasNeed())
  624. {
  625. PromptController.Instance.ShowFloatTextPrompt("未拥有必需品");
  626. }
  627. }
  628. private void InitLists()
  629. {
  630. _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
  631. _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
  632. _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
  633. _ui.m_partsListSearch.m_list.itemRenderer = ListPartsItem;
  634. listType1X = _ui.m_comListType1.target.x;
  635. partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;
  636. //一级菜单
  637. _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
  638. }
  639. private void showListType1()
  640. {
  641. _currentList2 = null;
  642. currentListType = DressUpListType.List1;
  643. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 3;
  644. GTween.To(_ui.target.width, listType1X, 0.5f)
  645. .SetTarget(_ui.m_comListType1.target)
  646. .OnUpdate((GTweener t) =>
  647. {
  648. _ui.m_comListType1.target.x = t.value.x;
  649. });
  650. }
  651. private void hideListType1()
  652. {
  653. GTween.To(listType1X, _ui.target.width, 0.5f)
  654. .SetTarget(_ui.m_comListType1.target)
  655. .OnUpdate((GTweener t) =>
  656. {
  657. _ui.m_comListType1.target.x = t.value.x;
  658. });
  659. }
  660. private void showListType2(int[] menuStrArr = null)
  661. {
  662. currentListType = DressUpListType.List2;
  663. if (menuStrArr != null && menuStrArr.Length > 0)
  664. {
  665. int len = menuStrArr.Length;
  666. _currentList2 = menuStrArr.Clone() as int[];
  667. _ui.m_comListType2.m_listType.RemoveChildrenToPool();
  668. _ui.m_comListType2.m_listType.numItems = len;
  669. //_ui.m_listType2.ResizeToFit(_ui.m_listType2.numItems);
  670. float maxHeight = _ui.target.height - _ui.m_comListType2.m_listType.y - DressUpView.BOTTOM_BLANK;
  671. if (_ui.m_comListType2.m_listType.height > maxHeight)
  672. {
  673. _ui.m_comListType2.m_listType.height = maxHeight;
  674. }
  675. }
  676. GTween.To(_ui.target.width, listType1X, 0.5f)
  677. .SetTarget(_ui.m_comListType2.target)
  678. .OnUpdate((GTweener t) =>
  679. {
  680. _ui.m_comListType2.target.x = t.value.x;
  681. });
  682. }
  683. private void hideListType2()
  684. {
  685. GTween.To(listType1X, _ui.target.width, 0.5f)
  686. .SetTarget(_ui.m_comListType2.target)
  687. .OnUpdate((GTweener t) =>
  688. {
  689. _ui.m_comListType2.target.x = t.value.x;
  690. });
  691. }
  692. private bool showListParts(int type, bool selectItem = false)
  693. {
  694. _currentMenuType = type;
  695. UpdatePartsListSort();
  696. if (_ui.m_partsList.m_list.numItems <= 0) return false;
  697. _ui.m_partsList.m_list.ResizeToFit(_ui.m_partsList.m_list.numItems);
  698. float maxHeight = _ui.m_partsList.target.height - _ui.m_partsList.m_list.y;
  699. if (_ui.m_partsList.m_list.height > maxHeight)
  700. {
  701. _ui.m_partsList.m_list.height = maxHeight;
  702. }
  703. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  704. {
  705. _ui.m_partsList.m_list.scrollPane.SetPosY(partsListScrollingPosY, false);
  706. partsListScrollingPosY = 0;
  707. }
  708. currentListType = DressUpListType.List3;
  709. GTween.To(_ui.target.width, partsListX, 0.5f)
  710. .SetTarget(_ui.m_partsList)
  711. .OnUpdate((GTweener t) =>
  712. {
  713. _ui.m_partsList.target.x = t.value.x;
  714. });
  715. UpdateListPartsSelected();
  716. return true;
  717. }
  718. private void OnComboBoxRarityChanged()
  719. {
  720. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  721. this.UpdatePartsListSort();
  722. }
  723. private void OnSearchComboBoxRarityChanged()
  724. {
  725. _scoreIndex = _ui.m_partsListSearch.m_comboBoxRarity.selectedIndex;
  726. this.UpdateSearchList();
  727. }
  728. private void UpdatePartsListSort()
  729. {
  730. if (_currentMenuType == 0) return;
  731. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  732. {
  733. _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
  734. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  735. {
  736. if (!_IsTeaPart)
  737. _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
  738. else
  739. _currentList3 = SuitUtil.SortTeaPartySuitByHighScore(_currentList3);
  740. }
  741. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  742. {
  743. if (!_IsTeaPart)
  744. _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
  745. else
  746. _currentList3 = SuitUtil.SortTeaPartySuitByLowScore(_currentList3);
  747. }
  748. else
  749. {
  750. _currentList3.Reverse();
  751. }
  752. }
  753. else
  754. {
  755. _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
  756. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  757. {
  758. if (!_IsTeaPart)
  759. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
  760. else
  761. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
  762. }
  763. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  764. {
  765. if (!_IsTeaPart)
  766. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
  767. else
  768. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
  769. }
  770. else
  771. {
  772. _currentList3.Reverse();
  773. }
  774. }
  775. // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  776. // {
  777. // _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
  778. // }
  779. // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  780. // {
  781. // _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
  782. // }
  783. //必穿品放在列表最前面
  784. if (_fightCfg!= null && _fightCfg.needItemId > 0)
  785. {
  786. int index = _currentList3.IndexOf(_fightCfg.needItemId);
  787. if (index >= 0)
  788. {
  789. int item = _currentList3[index];
  790. _currentList3.Remove(_currentList3[index]);
  791. _currentList3.Insert(0, item);
  792. }
  793. }
  794. else if (_fightCfg != null && _fightCfg.needSuitId > 0)
  795. {
  796. int index = _currentList3.IndexOf(_fightCfg.needSuitId);
  797. if (index >= 0)
  798. {
  799. int item = _currentList3[index];
  800. _currentList3.Remove(_currentList3[index]);
  801. _currentList3.Insert(0, item);
  802. }
  803. }
  804. _ui.m_partsList.m_list.RemoveChildrenToPool();
  805. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  806. }
  807. private void UpdateSuitPartsListSort()
  808. {
  809. if (_currentMenuType == 0) return;
  810. _currentList4 = new List<int>(SuitCfgArray.Instance.GetSuitItems(_currentSuitId, true));
  811. // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  812. // {
  813. // _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
  814. // }
  815. // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  816. // {
  817. // _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
  818. // }
  819. _ui.m_partsList2.m_list.RemoveChildrenToPool();
  820. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  821. }
  822. private void hideListParts()
  823. {
  824. GTween.To(partsListX, _ui.target.width, 0.5f)
  825. .SetTarget(_ui.m_partsList)
  826. .OnUpdate((GTweener t) =>
  827. {
  828. _ui.m_partsList.target.x = t.value.x;
  829. });
  830. }
  831. private void showListParts2(int suitId)
  832. {
  833. _currentSuitId = suitId;
  834. _ui.m_partsList2.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  835. this.UpdateSuitPartsListSort();
  836. _ui.m_partsList2.m_list.ResizeToFit(_ui.m_partsList2.m_list.numItems);
  837. float maxHeight = _ui.m_partsList2.target.height - _ui.m_partsList2.m_list.y;// - DressUpView.BOTTOM_BLANK;
  838. if (_ui.m_partsList2.m_list.height > maxHeight)
  839. {
  840. _ui.m_partsList2.m_list.height = maxHeight;
  841. }
  842. currentListType = DressUpListType.List4;
  843. GTween.To(_ui.target.width, partsListX, 0.5f)
  844. .SetTarget(_ui.m_partsList2)
  845. .OnUpdate((GTweener t) =>
  846. {
  847. _ui.m_partsList2.target.x = t.value.x;
  848. });
  849. }
  850. private void hideListParts2()
  851. {
  852. _currentMenuType = ConstDressUpItemType.TAO_ZHUANG;
  853. GTween.To(partsListX, _ui.target.width, 0.5f)
  854. .SetTarget(_ui.m_partsList2)
  855. .OnUpdate((GTweener t) =>
  856. {
  857. _ui.m_partsList2.target.x = t.value.x;
  858. });
  859. }
  860. private void showSearchListType()
  861. {
  862. // _currentList2 = null;
  863. currentListType = DressUpListType.List5;
  864. GTween.To(_ui.target.width, partsListX, 0.5f)
  865. .SetTarget(_ui.m_partsListSearch.target)
  866. .OnUpdate((GTweener t) =>
  867. {
  868. _ui.m_partsListSearch.target.x = t.value.x;
  869. });
  870. }
  871. private void hideSearchListType()
  872. {
  873. GTween.To(partsListX, _ui.target.width, 0.5f)
  874. .SetTarget(_ui.m_partsListSearch.target)
  875. .OnUpdate((GTweener t) =>
  876. {
  877. _ui.m_partsListSearch.target.x = t.value.x;
  878. });
  879. }
  880. /*****************************************************************************************************/
  881. private void DressResetSerch()
  882. {
  883. if (currentListType == DressUpListType.List5)
  884. {
  885. OnTouchPad();
  886. }
  887. }
  888. private void UpdateSerch(EventContext context)
  889. {
  890. if (context.data.ToString() == ConstMessage.DRESS_SEARCH)
  891. {
  892. _currentList3 = DressUpMenuItemDataManager.DressSearch(false);
  893. }
  894. else if (context.data.ToString() == ConstMessage.DRESS_FILTER)
  895. {
  896. _currentList3 = DressUpMenuItemDataManager.DressFilter(false);
  897. }
  898. ViewManager.Hide<ModalStatusView>();
  899. UpdateSearchList();
  900. if (currentListType != DressUpListType.List5)
  901. {
  902. hideListParts();
  903. hideListParts2();
  904. hideListType1();
  905. hideListType2();
  906. showSearchListType();
  907. }
  908. _currentMenuType = 0;
  909. }
  910. private void UpdateSearchList()
  911. {
  912. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  913. {
  914. if (!_IsTeaPart)
  915. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
  916. else
  917. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
  918. }
  919. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  920. {
  921. if (!_IsTeaPart)
  922. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
  923. else
  924. _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
  925. }
  926. _currentMenuType = 0;
  927. _ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
  928. }
  929. private void ListType1Item(int index, GObject item)
  930. {
  931. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  932. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[index];
  933. typeItem.m_icon.url = "ui://DressUp/hz_fenleitu_" + item1.id;
  934. typeItem.m_txtname.text = item1.name;
  935. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
  936. typeItem.target.data = item1.id;
  937. if (!_IsTeaPart)
  938. {
  939. typeItem.m_imgNeed.visible = ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, item1.id);
  940. typeItem.m_itemType.selectedIndex = 0;
  941. }
  942. else
  943. typeItem.m_itemType.selectedIndex = 1;
  944. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsFirstMenuNew(item1.id);
  945. UI_TypeItem.ProxyEnd();
  946. }
  947. private void ListType2Item(int index, GObject item)
  948. {
  949. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  950. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[_currentList2[index] - 1];
  951. typeItem.m_icon.url = "ui://DressUp/hz_fenleituej_" + item2.id;
  952. typeItem.m_txtname.text = item2.name;
  953. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
  954. typeItem.target.data = item2.id;
  955. if (!_IsTeaPart) {
  956. typeItem.m_itemType.selectedIndex = 0;
  957. var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  958. typeItem.m_imgNeed.visible = subType == item2.type;
  959. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsSecondMenuNew(item2.id);
  960. }
  961. else
  962. typeItem.m_itemType.selectedIndex = 1;
  963. UI_TypeItem.ProxyEnd();
  964. }
  965. private void ListTagItem(int index, GObject item)
  966. {
  967. string[][] tagsArr = (string[][])item.parent.data;
  968. UI_ComTagItem listItem = UI_ComTagItem.Proxy(item);
  969. int tagType = TagCfgArray.Instance.GetCfg(tagsArr[index][0]).type;
  970. UI.CommonGame.UI_ComTag itemTag = UI.CommonGame.UI_ComTag.Proxy(listItem.m_loaTag);
  971. itemTag.m_txtTag.text = tagsArr[index][0];
  972. itemTag.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);
  973. itemTag.m_loaTag.scale = new Vector2(0.8f, 0.8f);
  974. UI.CommonGame.UI_ComTag.ProxyEnd();
  975. listItem.m_txtScore.text = tagsArr[index][1];
  976. UI_ComTagItem.ProxyEnd();
  977. }
  978. private void ListPartsItem(int index, GObject item)
  979. {
  980. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  981. int id = (int)_currentList3[index];
  982. string iconRes = "";
  983. string partName = "";
  984. string ext = "png";
  985. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  986. {
  987. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  988. iconRes = suitCfg.res;
  989. partName = suitCfg.name;
  990. listItem.m_iconSelected.visible = false;
  991. if (!_IsTeaPart)
  992. {
  993. listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
  994. listItem.m_itemType.selectedIndex = 0;
  995. }
  996. else
  997. {
  998. if (listItem.m_ListTag.data == null)
  999. listItem.m_ListTag.itemRenderer = ListTagItem;
  1000. listItem.m_ListTag.data = suitCfg.tagsArr;
  1001. listItem.m_ListTag.numItems = suitCfg.tagsArr.Length;
  1002. listItem.m_itemType.selectedIndex = 1;
  1003. }
  1004. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  1005. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  1006. listItem.m_imgNew.visible = false;
  1007. }
  1008. else
  1009. {
  1010. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  1011. iconRes = itemCfg.res;
  1012. partName = itemCfg.name;
  1013. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  1014. if (!_IsTeaPart) {
  1015. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
  1016. listItem.m_itemType.selectedIndex = 0;
  1017. }
  1018. else {
  1019. if (listItem.m_ListTag.data == null)
  1020. listItem.m_ListTag.itemRenderer = ListTagItem;
  1021. listItem.m_ListTag.data = itemCfg.tagsArr;
  1022. listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
  1023. listItem.m_itemType.selectedIndex = 1;
  1024. }
  1025. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  1026. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  1027. listItem.m_imgNew.visible = isNew;
  1028. if (isNew)
  1029. {
  1030. ItemProxy.ReqSetItemRead(id).Coroutine();
  1031. }
  1032. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  1033. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  1034. }
  1035. if (listItem.target.data == null)
  1036. {
  1037. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  1038. longPressGesture.once = true;
  1039. longPressGesture.onAction.Add(OnLongPress);
  1040. _listLongPress.Add(longPressGesture);
  1041. }
  1042. listItem.m_btnAni.visible = false;
  1043. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  1044. listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
  1045. listItem.m_txtTitle.text = partName;
  1046. listItem.target.data = id;
  1047. listItem.m_imgNeed.visible = _fightCfg != null && (_fightCfg.needItemId == id || _fightCfg.needSuitId == id);
  1048. UI_PartsListItem.ProxyEnd();
  1049. }
  1050. private void ListParts2Item(int index, GObject item)
  1051. {
  1052. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  1053. int id = (int)_currentList4[index];
  1054. string iconRes = "";
  1055. string partName = "";
  1056. string ext = "png";
  1057. if (listItem.target.data == null)
  1058. {
  1059. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  1060. longPressGesture.once = true;
  1061. longPressGesture.onAction.Add(OnLongPress);
  1062. _listLongPress.Add(longPressGesture);
  1063. }
  1064. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  1065. iconRes = itemCfg.res;
  1066. partName = itemCfg.name;
  1067. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  1068. if (!_IsTeaPart) {
  1069. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
  1070. listItem.m_itemType.selectedIndex = 0;
  1071. }
  1072. else
  1073. {
  1074. if (listItem.m_ListTag.data == null)
  1075. listItem.m_ListTag.itemRenderer = ListTagItem;
  1076. listItem.m_ListTag.data = itemCfg.tagsArr;
  1077. listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
  1078. listItem.m_itemType.selectedIndex = 1;
  1079. }
  1080. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  1081. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  1082. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  1083. listItem.m_ScoreType.visible = true;
  1084. // int mainScore;
  1085. // int mainValuel;
  1086. // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
  1087. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + scoreType);
  1088. if (!_IsTeaPart) {
  1089. listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
  1090. listItem.m_itemType.selectedIndex = 0;
  1091. }
  1092. else
  1093. {
  1094. if (listItem.m_ListTag.data == null)
  1095. {
  1096. listItem.m_ListTag.itemRenderer = ListTagItem;
  1097. }
  1098. listItem.m_ListTag.data = itemCfg.tagsArr;
  1099. listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
  1100. listItem.m_itemType.selectedIndex = 1;
  1101. }
  1102. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  1103. listItem.m_txtTitle.text = partName;
  1104. listItem.target.data = id;
  1105. // listItem.m_txtScore.visible = false;
  1106. //listItem.m_ScoreType.visible = true;
  1107. listItem.m_imgNeed.visible = false;
  1108. listItem.m_btnAni.visible = false;
  1109. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  1110. listItem.m_imgNew.visible = isNew;
  1111. if (isNew)
  1112. {
  1113. ItemProxy.ReqSetItemRead(id).Coroutine();
  1114. }
  1115. UI_PartsListItem.ProxyEnd();
  1116. }
  1117. private void UpdateListPartsSelected()
  1118. {
  1119. GList list;
  1120. if (_ui.m_partsList.target.x == partsListX)
  1121. {
  1122. list = _ui.m_partsList.m_list;
  1123. }
  1124. else if (_ui.m_partsListSearch.target.x == partsListX)
  1125. {
  1126. list = _ui.m_partsListSearch.m_list;
  1127. }
  1128. else
  1129. {
  1130. return;
  1131. }
  1132. int count = list.numChildren;
  1133. int suitId = MyDressUpHelper.dressUpObj.suitId;
  1134. for (int i = 0; i < count; i++)
  1135. {
  1136. UI_PartsListItem listItem = UI_PartsListItem.Proxy(list.GetChildAt(i));
  1137. int id = (int)listItem.target.data;
  1138. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  1139. {
  1140. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  1141. }
  1142. else
  1143. {
  1144. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  1145. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  1146. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  1147. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  1148. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  1149. }
  1150. UI_PartsListItem.ProxyEnd();
  1151. }
  1152. }
  1153. private void UpdateSearchListPartsSelected()
  1154. {
  1155. int count = _ui.m_partsListSearch.m_list.numChildren;
  1156. int suitId = MyDressUpHelper.dressUpObj.suitId;
  1157. for (int i = 0; i < count; i++)
  1158. {
  1159. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsListSearch.m_list.GetChildAt(i));
  1160. int id = (int)listItem.target.data;
  1161. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  1162. {
  1163. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  1164. }
  1165. else
  1166. {
  1167. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  1168. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  1169. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  1170. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  1171. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  1172. }
  1173. UI_PartsListItem.ProxyEnd();
  1174. }
  1175. }
  1176. private void UpdateListSuitPartsSelected()
  1177. {
  1178. int count = _ui.m_partsList2.m_list.numChildren;
  1179. int suitId = MyDressUpHelper.dressUpObj.suitId;
  1180. for (int i = 0; i < count; i++)
  1181. {
  1182. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
  1183. int id = (int)listItem.target.data;
  1184. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  1185. var isSceneType = DressUpMenuItemCfg1Array.Instance.CheckIsSceneType(id);
  1186. bool isSuit = !isSceneType && suitId > 0 && SuitCfgArray.Instance.GetSuitIdOfItem(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  1187. bool isSceneSuit = isSceneType && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  1188. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  1189. UI_PartsListItem.ProxyEnd();
  1190. }
  1191. }
  1192. private void ShowTaskHint()
  1193. {
  1194. _ui.m_btnClose.visible = true;
  1195. _ui.m_grpTips.visible = true;
  1196. string str = "";
  1197. if (!_IsTeaPart)
  1198. str = _levelCfg.hint;
  1199. else {
  1200. var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
  1201. str = teapartyRoleCfg[_TeaPartyID - 1].hint;
  1202. }
  1203. _ui.m_txtHint.text = str;
  1204. if (this._ui.m_txtHint.textHeight > this._ui.m_txtHint.textFormat.size * 2)
  1205. {
  1206. this._ui.m_txtHint.align = AlignType.Left;
  1207. }
  1208. else
  1209. {
  1210. this._ui.m_txtHint.align = AlignType.Center;
  1211. }
  1212. }
  1213. private void UpdateScore()
  1214. {
  1215. if (!_IsTeaPart)
  1216. _ui.m_txtScore.text = "" + FightDataManager.Instance.GetScore(InstanceZonesDataManager.roleData).ToString();
  1217. // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
  1218. else
  1219. _ui.m_txtMatch.text = "" + LeagueDataManager.Instance.GetTeaPartyMatchedValue(InstanceZonesDataManager.roleData);
  1220. }
  1221. private void OnClickBtnSearch()
  1222. {
  1223. int type = 0;
  1224. if (_IsTeaPart)
  1225. type = 1;
  1226. ViewManager.Show<DressFilterView>(new object[] { 0, 0, type}, new object[] { typeof(DressUpView).FullName});
  1227. }
  1228. private void OnClickBtnAutoPlay()
  1229. {
  1230. FightDataManager.Instance.autoPlay = _ui.m_btnAutoPlay.selected;
  1231. }
  1232. private void OnClickComNeed()
  1233. {
  1234. if (_fightCfg.needItemId <= 0 && _fightCfg.needSuitId <= 0)
  1235. {
  1236. return;
  1237. }
  1238. if (_fightCfg.needSuitId > 0)
  1239. {
  1240. ViewManager.Show<SuitPartsDetailView>(_fightCfg.needSuitId, new object[] { typeof(DressUpFightView).FullName, this.viewData });
  1241. }
  1242. else
  1243. {
  1244. int itemId = (int)_ui.m_compNeed.target.data;
  1245. object[] sourceDatas = new object[] { itemId, new object[] { typeof(DressUpFightView).FullName, this.viewData }, 1 };
  1246. GoodsItemTipsController.ShowItemTips(itemId, sourceDatas);
  1247. }
  1248. }
  1249. private void RenderListTagItem(int index, GObject obj)
  1250. {
  1251. UI.CommonGame.UI_ComTag item = UI.CommonGame.UI_ComTag.Proxy(obj);
  1252. string tag = _fightCfg.needTagsArr[index];
  1253. int tagType = TagCfgArray.Instance.GetCfg(tag).type;
  1254. item.m_txtTag.text = tag;
  1255. item.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);
  1256. UI.CommonGame.UI_ComTag.ProxyEnd();
  1257. }
  1258. private bool CheckListCount(int type)
  1259. {
  1260. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  1261. {
  1262. return DressUpMenuSuitDataManager.GetSuitIDList().Count > 0;
  1263. }
  1264. else
  1265. {
  1266. return DressUpMenuItemDataManager.getItemDatasByType(type).Count > 0;
  1267. }
  1268. }
  1269. private void SendLog()
  1270. {
  1271. var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  1272. switch (levelCfg.type)
  1273. {
  1274. case ConstInstanceZonesType.Story:
  1275. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 2);
  1276. break;
  1277. case ConstInstanceZonesType.Studio:
  1278. StudioCfg studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
  1279. if (studioCfg.funId == typeof(StudioMetalView).Name)
  1280. {
  1281. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.JIN_SHU_XIU_FU, 2);
  1282. }
  1283. else if (studioCfg.funId == typeof(StudioFabricView).Name)
  1284. {
  1285. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.ZHI_WU_XIU_FU, 2);
  1286. }
  1287. else if (studioCfg.funId == typeof(StudioPropertyView).Name)
  1288. {
  1289. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHU_HUA_XIU_FU, 2);
  1290. }
  1291. break;
  1292. }
  1293. }
  1294. private void CheckGuide(object param)
  1295. {
  1296. if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0
  1297. || GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0
  1298. || GuideDataManager.IsGuideFinish(ConstGuideId.AUTOPLAY_FIGHT) <= 0)
  1299. {
  1300. UpdateToCheckGuide(null);
  1301. }
  1302. else
  1303. {
  1304. Timers.inst.Remove(CheckGuide);
  1305. }
  1306. _ui.m_loaGuide.visible = false;
  1307. }
  1308. protected override void UpdateToCheckGuide(object param)
  1309. {
  1310. if (!ViewManager.CheckIsTopView(this.viewCom) || _IsTeaPart) return;
  1311. int buyClothingIndex = 0;
  1312. int buyClothingSubIndex = 0;
  1313. int taozhuangIndex = 0;
  1314. int len = _ui.m_comListType1.m_listType.numChildren;
  1315. for (int i = 0; i < len; i++)
  1316. {
  1317. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType1.m_listType.GetChildAt(i));
  1318. if (item != null)
  1319. {
  1320. int menuID = (int)item.target.data;
  1321. DressUpMenuItemCfg1 dressUpMenuItemCfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(menuID);
  1322. if (GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0 && dressUpMenuItemCfg1.type == ConstDressUpItemType.TAO_ZHUANG)
  1323. {
  1324. taozhuangIndex = i;
  1325. break;
  1326. }
  1327. if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0 && _fightCfg.needItemId > 0 && ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, dressUpMenuItemCfg1.id))
  1328. {
  1329. buyClothingIndex = i;
  1330. break;
  1331. }
  1332. }
  1333. UI_TypeItem.ProxyEnd();
  1334. }
  1335. buyClothingSubIndex = _currentList3.IndexOf(_fightCfg.needItemId);
  1336. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.START_FIGHT, 3, "点击相应的分类,可以快速找到服饰。", taozhuangIndex);
  1337. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.START_FIGHT, 4, "", 0);
  1338. GuideController.TryGuide(_ui.m_btnNext, ConstGuideId.START_FIGHT, 5, "穿着完毕,来验证一下,换上的服饰是否符合需求。");
  1339. // GuideController.TryCompleteGuide(ConstGuideId.START_FIGHT, 5);
  1340. GuideController.TryGuide(_ui.m_compNeed.target, ConstGuideId.BUY_CLOTHING, 3, "当提示有“必需品”时,需要穿上对应物品才能通关。");
  1341. GuideController.TryGuide(_ui.m_btnRecommend, ConstGuideId.BUY_CLOTHING, 7, "点击推荐搭配,可以快速穿上必须品。");
  1342. GuideController.TryGuide(_ui.m_btnAutoPlay, ConstGuideId.BUY_CLOTHING, 8, "勾选后,会自动进行比拼哦~~");
  1343. GuideController.TryCompleteGuide(ConstGuideId.BUY_CLOTHING, 8);
  1344. GuideController.TryGuide(_ui.m_btnHint, ConstGuideId.FIGHT_TIPS, 1, "这次换装需要获得别人的认可呢。");
  1345. GuideController.TryCompleteGuide(ConstGuideId.FIGHT_TIPS, 1);
  1346. GuideController.TryGuide(_ui.m_btnRecommend, ConstGuideId.AUTOPLAY_FIGHT, 1, "", -1, true, 0, true, true);//这个引导自动完成,测试中策划要求件推荐搭配引导提前,为避免意外,没有改引导表,而是直接吧推荐搭配加到买必须品的引导力,这个引导自动完成
  1347. if (GuideDataManager.currentGuideId == GuideCfgArray.Instance.GetCfg(ConstGuideId.AUTOPLAY_FIGHT).id) GuideController.TryCompleteGuideIndex(ConstGuideId.AUTOPLAY_FIGHT, 1);
  1348. GuideController.TryCompleteGuide(ConstGuideId.AUTOPLAY_FIGHT, 1);
  1349. }
  1350. protected override void TryCompleteGuide()
  1351. {
  1352. base.TryCompleteGuide();
  1353. // GuideController.TryCompleteGuide(ConstGuideId.START_FIGHT, 5);
  1354. }
  1355. private void TeaPartyStatuChange()
  1356. {
  1357. if (_IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
  1358. {
  1359. AlertUI.Show("管理员已开启茶会,请前往挑战!")
  1360. .SetLeftButton(false).SetRightButton(true, "确定", (object data) =>
  1361. {
  1362. ViewManager.Show<LeagueTeaPartyView>();
  1363. });
  1364. }
  1365. }
  1366. }
  1367. }