|
@@ -69,6 +69,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
base.AddEventListener();
|
|
base.AddEventListener();
|
|
EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, RefreshList);
|
|
EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, RefreshList);
|
|
|
|
+ EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateRedDot);
|
|
}
|
|
}
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
@@ -80,6 +81,7 @@ namespace GFGGame
|
|
_ui.m_list.selectedIndex = _curSelectIndex;
|
|
_ui.m_list.selectedIndex = _curSelectIndex;
|
|
_ui.m_list.ScrollToView(_curSelectIndex);
|
|
_ui.m_list.ScrollToView(_curSelectIndex);
|
|
ShopViewManager.Instance.UpdateVipProgressCom(_ui.m_comVipLv.target);
|
|
ShopViewManager.Instance.UpdateVipProgressCom(_ui.m_comVipLv.target);
|
|
|
|
+ UpdateRedDot();
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -228,14 +230,15 @@ namespace GFGGame
|
|
if (_curSelectIndex == 0) return;
|
|
if (_curSelectIndex == 0) return;
|
|
_curSelectIndex = _curSelectIndex - 1;
|
|
_curSelectIndex = _curSelectIndex - 1;
|
|
_ui.m_list.ScrollToView(_curSelectIndex, true);
|
|
_ui.m_list.ScrollToView(_curSelectIndex, true);
|
|
- // _ui.m_list.selectedIndex = _curSelectIndex;
|
|
|
|
|
|
+ UpdateRedDot();
|
|
}
|
|
}
|
|
private void OnBtnRightClick()
|
|
private void OnBtnRightClick()
|
|
{
|
|
{
|
|
if (_curSelectIndex == _ui.m_list.numItems - 1) return;
|
|
if (_curSelectIndex == _ui.m_list.numItems - 1) return;
|
|
_curSelectIndex = _curSelectIndex + 1;
|
|
_curSelectIndex = _curSelectIndex + 1;
|
|
_ui.m_list.ScrollToView(_curSelectIndex, true);
|
|
_ui.m_list.ScrollToView(_curSelectIndex, true);
|
|
- // _ui.m_list.selectedIndex = _curSelectIndex;
|
|
|
|
|
|
+ UpdateRedDot();
|
|
|
|
+
|
|
}
|
|
}
|
|
private void UpdateSuitView()
|
|
private void UpdateSuitView()
|
|
{
|
|
{
|
|
@@ -243,6 +246,34 @@ namespace GFGGame
|
|
_ui.m_list.selectedIndex = _curSelectIndex;
|
|
_ui.m_list.selectedIndex = _curSelectIndex;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void UpdateRedDot()
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ bool leftRed = false;
|
|
|
|
+ bool rightRed = false;
|
|
|
|
+ VipCfg[] vipCfgs = VipCfgArray.Instance.dataArray;
|
|
|
|
+ for (int i = 1; i < vipCfgs.Length; i++)
|
|
|
|
+ {
|
|
|
|
+ bool isGet = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.VipGetStatus), vipCfgs[i].id);
|
|
|
|
+ bool red = !isGet && RoleDataManager.vipLv >= vipCfgs[i].id;
|
|
|
|
+
|
|
|
|
+ if (red && _curSelectIndex > i - 1)
|
|
|
|
+ {
|
|
|
|
+ leftRed = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ if (red && _curSelectIndex + 1 < i)
|
|
|
|
+ {
|
|
|
|
+ rightRed = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus) == 0 && RoleDataManager.vipLv > 0 && _curSelectIndex > RoleDataManager.vipLv - 1) { leftRed = true; }
|
|
|
|
+ if (GameGlobal.myNumericComponent.GetAsInt(NumericType.VipWeekGetStatus) == 0 && RoleDataManager.vipLv > 0 && _curSelectIndex + 1 < RoleDataManager.vipLv) { rightRed = true; }
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnLeft, leftRed);
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnRight, rightRed);
|
|
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|