|
@@ -7,7 +7,6 @@
|
|
|
using System.Collections.Generic;
|
|
|
using FairyGUI;
|
|
|
using FL.Data;
|
|
|
-using XGame;
|
|
|
using XGame.Database;
|
|
|
using XGame.Framework.UI;
|
|
|
|
|
@@ -38,7 +37,7 @@ namespace FL.FGUI
|
|
|
VM.UpBtn.onClick.Add(OnClickUpBtn);
|
|
|
VM.LeftBtn.onClick.Add(OnClickLeftBtn);
|
|
|
VM.RightBtn.onClick.Add(OnClickRightBtn);
|
|
|
- //VM.MwSet.onClick.Add(OnClickMwSet);
|
|
|
+ VM.MwSet.VM.PanelEvent.Add(OnClickMwSet);
|
|
|
VM.StarUpBtn.VM.PanelEvent.Add(OnClickStarUp);
|
|
|
VM.LevelUpBtn.VM.PanelEvent.Add(OnClickLevelUp);
|
|
|
VM.DownBtn.onClick.Add(OnClickDownBtn);
|
|
@@ -51,7 +50,7 @@ namespace FL.FGUI
|
|
|
VM.UpBtn.onClick.Remove(OnClickUpBtn);
|
|
|
VM.LeftBtn.onClick.Remove(OnClickLeftBtn);
|
|
|
VM.RightBtn.onClick.Remove(OnClickRightBtn);
|
|
|
- //VM.MwSet.onClick.Remove(OnClickMwSet);
|
|
|
+ VM.MwSet.VM.PanelEvent.Remove(OnClickMwSet);
|
|
|
VM.StarUpBtn.VM.PanelEvent.Remove(OnClickStarUp);
|
|
|
VM.LevelUpBtn.VM.PanelEvent.Remove(OnClickLevelUp);
|
|
|
VM.DownBtn.onClick.Remove(OnClickDownBtn);
|
|
@@ -128,7 +127,9 @@ namespace FL.FGUI
|
|
|
OnSelectPartnerOffset(1);
|
|
|
}
|
|
|
|
|
|
- private void OnClickMwSet(EventContext context) { }
|
|
|
+ private void OnClickMwSet(EventContext context) {
|
|
|
+ //Context.UI.OpenAsync(UIKeys.PartnerEpiChangePanel, )
|
|
|
+ }
|
|
|
|
|
|
#endregion
|
|
|
private bool _init = false;
|
|
@@ -159,6 +160,8 @@ namespace FL.FGUI
|
|
|
XGame.Framework.Assert.IsNotNull(table, $"圣兵表不存在,id:{_curSelectId}");
|
|
|
VM.NameLabel.text = table.Name;
|
|
|
var attr = PartnersData.Instance.GetPartnerAttrByTableId(table.Id);
|
|
|
+ var level = attr == null ? 1 : attr.Level;
|
|
|
+ var star = attr == null ? 1 : attr.RisingStarLv;
|
|
|
if (attr == null)
|
|
|
{
|
|
|
VM.StarUpBtn.Disable();
|
|
@@ -167,14 +170,26 @@ namespace FL.FGUI
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- VM.StarUpBtn.Enable(null);
|
|
|
- VM.LevelUpBtn.Enable(null);
|
|
|
+ if (partnerStarUpTableRepo.GetPartnerStarTable(_curSelectId, star + 1) == null)
|
|
|
+ {
|
|
|
+ VM.StarUpBtn.Disable();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ VM.StarUpBtn.Enable(null);
|
|
|
+ }
|
|
|
+ if (partnerLvUpTableRepo.GetPartnerLvUpTable(_curSelectId, level + 1) == null)
|
|
|
+ {
|
|
|
+ VM.LevelUpBtn.Disable();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ VM.LevelUpBtn.Enable(null);
|
|
|
+ }
|
|
|
VM.Have.selectedIndex = 0;
|
|
|
var pos = PartnersData.Instance.UpSbPosMap.GetValueOrDefault(_curSelectId, -1);
|
|
|
VM.IsUp.selectedIndex = pos < 0 ? 0 : 1;
|
|
|
}
|
|
|
- var level = attr == null ? 1 : attr.Level;
|
|
|
- var star = attr == null ? 1 : attr.RisingStarLv;
|
|
|
ShowStar(star);
|
|
|
VM.LvLabel.text = $"Lv {level}";
|
|
|
VM.DetailNested.Ctrl.ShowUI(_curSelectId);
|
|
@@ -212,7 +227,7 @@ namespace FL.FGUI
|
|
|
|
|
|
private void ShowUpBtn(int sbId)
|
|
|
{
|
|
|
- VM.StarUpBtn.Ctrl.ShowUI(sbId);
|
|
|
+ VM.StarUpBtn.Ctrl.SetData(sbId);
|
|
|
VM.LevelUpBtn.Ctrl.ShowUI(sbId);
|
|
|
}
|
|
|
|