示例#1
0
        public void OnDoubleClickGroupItem(int index, ListViewItem item)
        {
            m_CurSelectIndex = index;
            m_CurSelectItem  = LegendCupGroupList.DataSource[index];

            m_CurSearchID = 0;
            SelectImage.gameObject.SetActive(false);
            Vector2 mousePos = UISystem.Instance.GetMousePos();
            UlistComponentLegendCupGroup compGroup = item as UlistComponentLegendCupGroup;

            foreach (LegendCupCompetitionNodeItem nodeItem in compGroup.NodeItemList)
            {
                RectTransform rectTrans = nodeItem.gameObject.GetComponent <RectTransform>();
                if (RectTransformUtility.RectangleContainsScreenPoint(rectTrans, mousePos, UISystem.Instance.GetCamera()))
                {
                    m_CurSearchID = nodeItem.SearchID;
                    if (m_CurSearchID <= 0)
                    {
                        return;
                    }

                    SelectImage.rectTransform.SetParent(nodeItem.SelectIconAttach.GetComponent <RectTransform>(), false);
                    SelectImage.gameObject.SetActive(true);

                    LegendCupNodeWarData nodeData = new LegendCupNodeWarData();
                    nodeData.nLegendCupID = m_LegendCupID;
                    nodeData.nRoundID     = m_RoundID;
                    nodeData.nSearchID    = m_CurSearchID;
                    UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_WARRECORD_CUPNODE_SHOW, nodeData);

                    // GM账号,进入比赛入口状态更新
                    int nPDBID = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
                    if (GameLogicAPI.bIsGM(nPDBID))
                    {
                        if (nodeItem.NodeInfo.byCompetitionNodeState == (byte)ECompetitionNodeState.emNodeState_CanEnter)
                        {
                            GotoBtn.interactable = true;
                            GotoBtnDes.color     = UDefines.CommomColor(ECommonColor.ECC_White);
                            m_GotoSearchID       = m_CurSearchID;
                        }
                        else
                        {
                            GotoBtn.interactable = false;
                            GotoBtnDes.color     = UDefines.CommomColor(ECommonColor.ECC_Gray);
                            m_GotoSearchID       = 0;
                        }
                    }
                }
            }
        }
示例#2
0
        //public void SetEnterBtnState(bool bVisible)
        //{
        //    GotoBtn.interactable = bVisible;
        //}

        //public void OnClickGotoBtn()
        //{
        //    if (m_legendCupID == 0 || m_roundID == 0 || m_searchID == 0)
        //    {
        //        return;
        //    }

        //    cmd_legendcup_enter_competition_node nodeData = new cmd_legendcup_enter_competition_node();
        //    nodeData.nLegendCupID = m_legendCupID;
        //    nodeData.nRoundID = m_roundID;
        //    nodeData.nSearchID = m_searchID;
        //    ViewEventHelper.Instance.SendCommand<cmd_legendcup_enter_competition_node>(GameLogicDef.GVIEWCMD_LEGENDCUP_ENTER_COMPETITION_NODE, ref nodeData);

        //    // 删除DIDA提醒
        //    LogicDataCenter.legendCupDataManager.SetLegendCupDIDA(false, m_legendCupID, m_roundID, m_searchID);
        //}

        public void OnClickViewCompetitionBtn()
        {
            if (m_searchID == 0)
            {
                return;
            }

            LegendCupNodeWarData nodeData = new LegendCupNodeWarData();

            nodeData.nLegendCupID = m_legendCupID;
            nodeData.nRoundID     = m_roundID;
            nodeData.nSearchID    = m_searchID;
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_WARRECORD_CUPNODE_SHOW, nodeData);
        }
示例#3
0
        public void OnClickViewCompetitionBtn()
        {
            if (m_CurSearchID == 0)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_LEGENDCUP_NOT_SELECT_ANY_COMPETITION_NODE);
                return;
            }

            LegendCupNodeWarData nodeData = new LegendCupNodeWarData();

            nodeData.nLegendCupID = m_LegendCupID;
            nodeData.nRoundID     = m_RoundID;
            nodeData.nSearchID    = m_CurSearchID;
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_WARRECORD_CUPNODE_SHOW, nodeData);
        }