| | |
| | | [SerializeField] Button m_CloseButton;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | List<AuctionItemConfig> auctionItemList=new List<AuctionItemConfig>(); |
| | | List<AuctionItemConfig> auctionItemList = new List<AuctionItemConfig>(); |
| | | int ItemType = 1; |
| | | #region Built-in |
| | | enum AttentionType
|
| | |
| | | {
|
| | |
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | m_ScrollerController.lockType = EnhanceLockType.KeepVertical; |
| | | |
| | | m_ScrollerController.lockType = EnhanceLockType.KeepVertical;
|
| | |
|
| | | } |
| | | |
| | | protected override void AddListeners() |
| | |
| | | m_MaterialToggle.onValueChanged.AddListener(OnClickToggleMaterial); |
| | | m_MountAndPetToggle.onValueChanged.AddListener(OnClickToggleMountAndPet); |
| | | m_EquipmentToggle.onValueChanged.AddListener(OnClickToggleEquipment); |
| | | m_CloseButton.AddListener(()=> { CloseImmediately(); }); |
| | | m_CloseButton.AddListener(() => { CloseImmediately(); }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | ItemType = GetItemType(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | |
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | |
|
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | |
| | | {
|
| | | gridCtrl.Refresh();
|
| | | auctionItemList = auctionHelpModel.GetAuctionItemList(ItemType);
|
| | | int LINE = Mathf.CeilToInt((float)auctionItemList.Count/4);
|
| | | int LINE = Mathf.CeilToInt((float)auctionItemList.Count / 4);
|
| | | for (int i = 0; i < LINE; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | |
| | | unsubscribeBtn.gameObject.SetActive(false);
|
| | | attentionBtn.gameObject.SetActive(true);
|
| | | }
|
| | | attentionBtn.SetListener(()=> |
| | | attentionBtn.SetListener(() =>
|
| | | {
|
| | | DebugEx.Log("关注物品ID"+ itemConfig.ID);
|
| | | AuctionInquiry.Instance.SendAttentionAuctionItemChange(itemConfig.ID,1);
|
| | | if (model.AttentionAuctionItemIDdic.Count >= auctionHelpModel.MaxFocusCount)//到达关注上限
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("PMH_16"));
|
| | | return;
|
| | | }
|
| | | DebugEx.Log("关注物品ID" + itemConfig.ID);
|
| | | AuctionInquiry.Instance.SendAttentionAuctionItemChange(itemConfig.ID, 1);
|
| | | });
|
| | | unsubscribeBtn.SetListener(()=> |
| | | unsubscribeBtn.SetListener(() =>
|
| | | {
|
| | | DebugEx.Log("取消关注物品ID" + itemConfig.ID);
|
| | | AuctionInquiry.Instance.SendAttentionAuctionItemChange(itemConfig.ID, 0);
|
| | |
| | | type = (int)AttentionType.Equipment;
|
| | | }
|
| | | return type;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | } |
| | | |
| | | } |