Esempio n. 1
0
    /// <summary>
    /// 点击列表数据格回调
    /// </summary>
    /// <param name="eType">UIEvent</param>
    /// <param name="data">格子</param>
    /// <param name="param">参数</param>
    void OnClickDataListEventCallback(UIEventType eType, object data, object param)
    {
        switch (eType)
        {
        case UIEventType.Click:

            if (data is UIWeaponSoulInfoGrid)
            {
                UIWeaponSoulInfoGrid egrid = data as UIWeaponSoulInfoGrid;
                SetSelectId(egrid.QWThisId);
            }
            else if (data is UITabGrid)
            {
                UITabGrid tabGrid = data as UITabGrid;
                if (tabGrid.Data is TabMode)
                {
                    if (IsMuhonListEmpty())
                    {
                        TipsManager.Instance.ShowTips(LocalTextType.Local_TXT_Soul_OwnNoneNotice);
                    }
                    SetStatus((TabMode)tabGrid.Data);
                }
            }
            break;
        }
    }
Esempio n. 2
0
 private void OnUIEventCallback(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UIItemCommonGrid)
         {
             UIItemCommonGrid grid = data as UIItemCommonGrid;
             if (grid != null)
             {
                 if (m_currInputPanel != null)
                 {
                     //1 物品 2 坐骑 3 宠物
                     int type = 2;
                     if (m_CurrToggleEnum == ToggleEnum.Pet)
                     {
                         type = 3;
                     }
                     else if (m_CurrToggleEnum == ToggleEnum.Mount)
                     {
                         type = 2;
                     }
                     else if (m_CurrToggleEnum == ToggleEnum.Wear || m_CurrToggleEnum == ToggleEnum.Bag)
                     {
                         type = 1;
                     }
                     m_currInputPanel.AddLinkerItem(grid.Data.Name, grid.Data.ItemThisId, grid.Data.Qulity, type);
                 }
             }
         }
     }
     break;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 手动激活注册事件
 /// </summary>
 /// <param name="eventType">事件类型</param>
 /// <param name="data">数据</param>
 /// <param name="param">参数</param>
 protected void InvokeUIDlg(UIEventType eventType, object data, object param)
 {
     if (IsUIEventDelegateReady)
     {
         uiEventDelegate.Invoke(eventType, data, param);
     }
 }
Esempio n. 4
0
    /// <summary>
    /// 氏族信息tab事件委托
    /// </summary>
    /// <param name="type"></param>
    /// <param name="data"></param>
    /// <param name="param"></param>
    private void OnInfoGridUIDlg(UIEventType type, object data, object param)
    {
        switch (type)
        {
        case UIEventType.Click:
        {
            if (data is UITabGrid)
            {
                UITabGrid    tabGrid = (UITabGrid)data;
                ClanInfoMode mode    = (ClanInfoMode)tabGrid.Data;
                if (mode != ClanInfoMode.None)
                {
                    SetInfoMode(mode);
                }
            }
            else if (data is UIClanDeclareWarGrid)
            {
                UIClanDeclareWarGrid g = data as UIClanDeclareWarGrid;
                if (preDeclareWarGrid != null)
                {
                    preDeclareWarGrid.SetSelect(false);
                }
                g.SetSelect(true);
                preDeclareWarGrid = g;
            }
        }

        break;
        }
    }
Esempio n. 5
0
 /// <summary>
 /// 商城格子UI事件委托
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
         if (data is UIMallGrid)
         {
             UIMallGrid mallGrid = data as UIMallGrid;
             if (null != mallGrid)
             {
                 SetSelectItemId(mallGrid.MallItemId);
             }
         }
         else if (data is UITabGrid)
         {
             UITabGrid tabGrid = data as UITabGrid;
             if (null != tabGrid)
             {
                 if (tabGrid.Data is int)
                 {
                     SetActiveTab((int)tabGrid.Data);
                 }
             }
         }
         else if (data is UIToggleGrid)
         {
             UIToggleGrid tab = data as UIToggleGrid;
             SetActiveStore((GameCmd.CommonStore)(int) tab.Data);
         }
         break;
     }
 }
Esempio n. 6
0
 private void OnUITabGridEventDlg(UIEventType eventType, object data, object param)
 {
     if (null == data)
     {
         return;
     }
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UITabGrid)
         {
             UITabGrid tab = data as UITabGrid;
             if (tab.TabID == 100)
             {
                 onClick_BaseProp_Btn(m_trans_BaseProp.gameObject);
             }
             else if (tab.TabID == 101)
             {
                 onClick_DetailProp_Btn(m_trans_DetailProp.gameObject);
             }
         }
     }
     break;
     }
 }
Esempio n. 7
0
    /// <summary>
    /// 点击事件
    /// </summary>
    /// <param name="eventType"></param>
    /// <param name="data"></param>
    /// <param name="param"></param>
    private void OnRivalGridUIEvent(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            ArenaRivalCardGrid grid = data as ArenaRivalCardGrid;
            if (grid != null)
            {
                AManager.ChallengeTarget = grid.rivalInfo;

                if (AManager.ChallengeTimes == 0)
                {
                    CheckAndReqRefreshChallengeTimes();
                    return;
                }

                if (AManager.CD > 0)
                {
                    CheckAndReqClearCD();
                    return;
                }

                //发起挑战
                DataManager.Manager <ArenaManager>().ReqChallengeInvite(grid.rivalInfo.id, grid.rivalInfo.name, grid.rivalInfo.rank, grid.rivalInfo.online_state);
            }
        }
    }
Esempio n. 8
0
 /// <summary>
 /// 镶嵌格子数据UI事件回调
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnInlayGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid ctg = data as UICtrTypeGrid;
             SetActiveGemType((GameCmd.GemType)ctg.ID);
         }
         else if (data is UIGemGrid)
         {
             UIGemGrid gGRid = data as UIGemGrid;
             //镶嵌
             DoInlay(gGRid.Data);
         }
         else if (data is UIEquipPosStatusGrid)
         {
             UIEquipPosStatusGrid epsGrid = data as UIEquipPosStatusGrid;
             SetSelectPart(epsGrid.Data);
         }
         else if (data is UIGemInLayGrid)
         {
             UIGemInLayGrid gInlayGrid = data as UIGemInLayGrid;
             DoUnload(gInlayGrid.Data);
         }
     }
     break;
     }
 }
Esempio n. 9
0
    private void OnGridEventDlg(UIEventType eventType, object data, object param)
    {
        switch (eventType)
        {
        case UIEventType.Click:
        {
            if (data is UITypeGrid)
            {
                UITypeGrid tGrid = data as UITypeGrid;
                SetSelectFirstType(tGrid.Data);
            }
            else if (data is UISecondTypeGrid)
            {
                UISecondTypeGrid      sGrid       = data as UISecondTypeGrid;
                MissionEnum           missionType = (MissionEnum)m_uActiveFType;
                List <QuestTraceInfo> taskList    = GetQuestListByType(missionType);

                if (taskList != null && taskList.Count > 0)
                {
                    SetSelectSecondType(taskList.Find(P => P.taskId == sGrid.Data), false);
                }
            }
        }
        break;
        }
    }
Esempio n. 10
0
 /// <summary>
 /// 点击弹出获取item面板
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 void UIItemInfoEventDelegate(UIEventType eventType, object data, object param)
 {
     if (eventType == UIEventType.Click)
     {
         DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.GetWayPanel, data: DataManager.Manager <DailyTestManager>().FuRuiZhuItemId);
     }
 }
Esempio n. 11
0
        public void BoradCast(UIEventType type, object parameter = null)
        {
            if (type == UIEventType.SERVER_TIME)
            {
                if (waitNetWindow != null)
                {
                    var success = (bool)parameter;
                    if (success)
                    {
                        waitNetWindow.Open();
                        windows.Add(waitNetWindow);
                    }
                    else
                    {
                        TipsUI.Instance.ShowTip(new TipsInfo()
                        {
                            autoClose = true,
                            duration  = 1f,
                            openMask  = false,
                            tipStr    = LanguageMgr.GetText("Active_Award_No_Network")
                        });
                        Close(waitNetWindow);
                    }
                    waitNetWindow = null;
                }
            }

            for (int i = windows.Count - 1; i >= 0; i--)
            {
                var win = windows[i];
                win.OnEvent(type, parameter);
            }
        }
Esempio n. 12
0
 void OnDailyTabGridUIEvent(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
         if (data is UITabGrid)
         {
             UITabGrid g = data as UITabGrid;
             if (g.Data != null && g.Data is int)
             {
                 int index = (int)g.Data;
                 if (index < m_listDataType.Count)
                 {
                     SetActiveDailyTab(m_listDataType[index]);
                 }
             }
         }
         if (data is UIDailyCalendarGrid)
         {
             UIDailyCalendarGrid grid = data as UIDailyCalendarGrid;
             ShowDailyActivityInfo(grid);
         }
         break;
     }
 }
Esempio n. 13
0
 /// <summary>
 /// 格子UI事件委托
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UIMallGrid)
         {
             UIMallGrid mallGrid = data as UIMallGrid;
             if (null != mallGrid)
             {
                 SetSelectItemId(mallGrid.MallItemId);
             }
         }
         else if (data is UITabGrid)
         {
             UITabGrid tabGrid = data as UITabGrid;
             if (null != tabGrid)
             {
                 SetActiveTab((int)tabGrid.Data);
             }
         }
         else if (data is UISplitGetGrid && null != param)
         {
             UISplitGetGrid getGrid = data as UISplitGetGrid;
             if (null != getGrid)
             {
                 //点击icon弹出tips
                 TipsManager.Instance.ShowItemTips(getGrid.BaseId, needCompare: false);
             }
         }
     }
     break;
     }
 }
Esempio n. 14
0
 private void OnTeamAddGridUIEvent(UIEventType eventType, object data, object param)
 {
     if (eventType == UIEventType.Click)
     {
         DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.TeamInvitePanel);//打开添加队员界面
     }
 }
Esempio n. 15
0
 private void OnUIGridEventDlg(UIEventType eventType, object data, object param)
 {
     if (null == data)
     {
         return;
     }
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UIPetSettingGrid)
         {
             UIPetSettingGrid gridData = data as UIPetSettingGrid;
             uint             petID    = gridData.PetID;
             if (gridData.IsSetting())
             {
                 TipsManager.Instance.ShowTips("已经设置过了");
             }
             else
             {
                 m_petDataManager.SetUserQuickList(petID);
                 m_petDataManager.SendQuickListMsg();
             }
         }
     }
     break;
     }
 }
Esempio n. 16
0
 protected override void InfoGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UIItemInfoGrid)
         {
             UIItemInfoGrid infoGrid = data as UIItemInfoGrid;
             if (BaseId != 0)
             {
                 if (infoGrid.NotEnough)
                 {
                     InvokeUIDlg(eventType, data, BaseId);
                 }
                 else
                 {
                     TipsManager.Instance.ShowItemTips(BaseId);
                 }
             }
         }
     }
     break;
     }
 }
Esempio n. 17
0
 /// <summary>
 /// 格子事件委托
 /// </summary>
 /// <param name="eventType"></param>
 /// <param name="data"></param>
 /// <param name="param"></param>
 private void OnGridEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid tGrid = data as UICtrTypeGrid;
             SetSelectFirstType((uint)tGrid.ID);
         }
         else if (data is UISecondTypeGrid)
         {
             UISecondTypeGrid sGrid = data as UISecondTypeGrid;
             SetSelectSecondType(sGrid.Data);
         }
         else if (data is UIComposeGrid)
         {
             UIComposeGrid cGrid = data as UIComposeGrid;
             SetSelectId(cGrid.Id);
         }
     }
     break;
     }
 }
Esempio n. 18
0
 public override void OnHandleEvent(UIEventType evtID, object[] args)
 {
     if (evtID == UIEventType.End_RyuuKyoku)
     {
         owner.ChangeState <KyoKuOverState>();
     }
 }
Esempio n. 19
0
 void UIItemInfoEventDelegate(UIEventType eventType, object data, object param)
 {
     if (eventType == UIEventType.Click)
     {
         if (data is UIKnightLevelUPItemGrid)
         {
             UIKnightLevelUPItemGrid grid = data as UIKnightLevelUPItemGrid;
             if (grid != null)
             {
                 if (grid.ItemNum < m_needNum)
                 {
                     DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.GetWayPanel, data: grid.ItemID);
                 }
                 else
                 {
                     if (grid.IsBreak)
                     {
                         //stAddKnightRankRideUserCmd_C cmd = new stAddKnightRankRideUserCmd_C();
                         //NetService.Instance.Send(cmd);
                     }
                     else
                     {
                         stAddKnightExpRideUserCmd_C cmd = new stAddKnightExpRideUserCmd_C();
                         cmd.item = grid.ItemID;
                         cmd.num  = 1;
                         NetService.Instance.Send(cmd);
                     }
                 }
             }
         }
     }
 }
Esempio n. 20
0
 private void OnUIGridEventDlg(UIEventType eventType, object data, object param)
 {
     if (null == data)
     {
         return;
     }
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is PetTujianTitleItem)
         {
             PetTujianTitleItem item = data as PetTujianTitleItem;
             if (item != null)
             {
                 TujianBtnClick(item.gameObject);
             }
             if (m_ctor_tujiantitlescroll != null)
             {
                 m_ctor_tujiantitlescroll.SetSelect(item);
             }
         }
     }
     break;
     }
 }
Esempio n. 21
0
 protected override void InfoGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UIItemInfoGrid)
         {
             UIItemInfoGrid infoGrid = data as UIItemInfoGrid;
             if (ID != 0)
             {
                 if (infoGrid.NotEnough)
                 {
                     InvokeUIDlg(eventType, data, ID);
                 }
                 else
                 {
                     if (IsGetGodWeapen)
                     {
                         NetService.Instance.Send(new stGetArticfactRewardDataUserCmd_CS()
                             {
                                 id = WeapenDataID
                             });
                     }
                     else
                     {
                         TipsManager.Instance.ShowItemTips(BaseData);
                     }
                 }
             }
         }
     }
     break;
     }
 }
Esempio n. 22
0
    /// <summary>
    /// grid的点击事件
    /// </summary>
    /// <param name="eventType"></param>
    /// <param name="data"></param>
    /// <param name="param"></param>
    private void OnGridUIEvent(UIEventType eventType, object data, object param)
    {
        if (eventType == UIEventType.Click)
        {
            if (data is UITeamMainTargetGrid)
            {
                UITeamMainTargetGrid grid = data as UITeamMainTargetGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectMainGrid(grid.MainId);
            }
            else if (data is UITeamIndexTargetGrid)
            {
                UITeamIndexTargetGrid grid = data as UITeamIndexTargetGrid;
                if (grid == null)
                {
                    return;
                }

                SetSelectIndexGrid(grid.Id);
            }
        }
    }
Esempio n. 23
0
 protected override void InfoGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
     {
         if (data is UIItemInfoGrid)
         {
             if (m_uint_qwThisId == 0)
             {
                 base.InfoGridUIEventDlg(eventType, data, param);
             }
             else
             {
                 Equip equip = DataManager.Manager <ItemManager>().GetBaseItemByQwThisId <Equip>(m_uint_qwThisId);
                 if (null != equip)
                 {
                     TipsManager.Instance.ShowItemTips(m_uint_qwThisId);
                 }
             }
         }
     }
     break;
     }
 }
Esempio n. 24
0
 void OnSkillGridUIEvent(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
         UISkillGrid grid = data as UISkillGrid;
         if (grid != null)
         {
             if (grid.Data != null && grid.Data.skillid != 0)
             {
                 DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.PlayerSkillTipsPanel, panelShowAction: (pb) =>
                 {
                     if (null != pb && pb is PlayerSkillTipsPanel)
                     {
                         PlayerSkillTipsPanel panel = pb as PlayerSkillTipsPanel;
                         if (panel != null)
                         {
                             table.SkillDatabase skilldb = GameTableManager.Instance.GetTableItem <table.SkillDatabase>((uint)grid.Data.skillid, grid.Data.level);
                             panel.ShowUI(PlayerSkillTipsPanel.SkillTipsType.Pet, skilldb, grid.Data.level);
                             panel.InitParentTransform(grid.transform, new Vector2(0, 80));
                         }
                     }
                 });
             }
         }
         break;
     }
 }
Esempio n. 25
0
 /// <summary>
 /// 创建并编写一个事件数据对象
 /// </summary>
 /// <param name="eventType">UI事件类型</param>
 /// <param name="data">数据</param>
 /// <returns></returns>
 internal EventDto WriteEventDto(UIEventType eventType, object data)
 {
     var dto = new EventDto();
     dto.Type = eventType;
     dto.data = data;
     return dto;
 }
Esempio n. 26
0
 public void OnEvent(UIEventType sevent, object obj)
 {
     if (uiObject != null)
     {
         uiObject.OnEvent(sevent, obj);
     }
 }
Esempio n. 27
0
    protected override void InfoGridUIEventDlg(UIEventType eventType, object data, object param)
    {
        switch (eventType)
        {
        case UIEventType.Click:
        {
            InvokeUIDlg(eventType, this, BaseId);
            //if (data is UIItemInfoGrid)
            //{
            //    UIItemInfoGrid infoGrid = data as UIItemInfoGrid;
            //    if (BaseId != 0)
            //    {
            //        if (infoGrid.NotEnough)
            //        {
            //            InvokeUIDlg(eventType, data, m_uint_baseId);
            //        }
            //        else
            //        {
            //            TipsManager.Instance.ShowItemTips(BaseId);
            //        }
            //    }

            //}
        }
        break;
        }
    }
Esempio n. 28
0
    void OnGridUIEvent(UIEventType eventType, object data, object param)
    {
        switch (eventType)
        {
        case UIEventType.Click:

            if (data is UIServerListGrid)
            {
                UIServerListGrid serverGrid = data as UIServerListGrid;
                if (serverGrid != null)
                {
                    HideSelf();
                    Mgr.SetCurSelectZoneIndex(serverGrid.Index);
                    DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.LoginPanel, data: LoginPanel.ShowUIEnum.StartGame);
                }
            }
            else if (data is UIZonePageGrid)
            {
                UIZonePageGrid zoneGrid = data as UIZonePageGrid;
                if (zoneGrid != null)
                {
                    if (m_cur_page_index != zoneGrid.Index)
                    {
                        m_cur_page_index = zoneGrid.Index;
                        m_ctor_LeftPanel.SetSelect(zoneGrid);
                        ShowAreaServerData();
                    }
                }
            }
            break;
        }
    }
Esempio n. 29
0
 private void OnGridUIEventDlg(UIEventType eventType, object data, object param)
 {
     switch (eventType)
     {
     case UIEventType.Click:
         if (data is UICtrTypeGrid)
         {
             UICtrTypeGrid tabGrid = data as UICtrTypeGrid;
             SetSelectFirstType((uint)tabGrid.ID);
             if (m_uintDic.ContainsKey((uint)tabGrid.ID))
             {
                 if (m_uintDic[(uint)tabGrid.ID].Count > 0)
                 {
                     SetSelectSecondType(m_uintDic[(uint)tabGrid.ID][0], true);
                 }
             }
         }
         if (data is UIAchievemenGrid)
         {
             UIAchievemenGrid achieveGrid = data as UIAchievemenGrid;
             if (null != achieveGrid)
             {
                 SetSelectAchievementGrid(achieveGrid.index);
             }
         }
         if (data is UISecondTypeGrid)
         {
             UISecondTypeGrid sec = data as UISecondTypeGrid;
             SetSelectSecondType(sec.Data);
         }
         break;
     }
 }
    /*
     * IEnumerator AskHandleSuteHai()
     * {
     *  // wait for sute hai animation time.
     *  yield return new WaitForSeconds( MahjongView.SuteHaiAnimationTime + 0.1f );
     *
     *  OnSuteHaiAnimEnd();
     * }
     */

    public override void OnHandleEvent(UIEventType evtID, object[] args)
    {
        if (evtID == UIEventType.On_UIAnim_End)
        {
            OnSuteHaiAnimEnd();
        }
    }
Esempio n. 31
0
        public static CardProfileEvent GetInstance(OrbCardProfile profile, UIEventType type = UIEventType.NotSet)
        {
            _instance.Profile = profile;
            _instance.IsCardOpen = profile.gameObject.activeSelf; 
            _instance.CardType = profile.internalCard;
            _instance.Type = type; 

            return _instance; 
        }
Esempio n. 32
0
    /// <summary>
    /// 发送UI事件
    /// </summary>
    public void SendUIEvent(UITypeEnum e, UIEventType type, UIModelBase model) 
    {
        switch (type)
        {
            case UIEventType.Show:
                GetTransform(e).SendMessage("ShowUI", model, SendMessageOptions.RequireReceiver);

                break;
            case UIEventType.Hide:
                GetTransform(e).SendMessage("HideUI", model, SendMessageOptions.RequireReceiver);

                break;
            case UIEventType.Refresh:
                GetTransform(e).SendMessage("RefreshUI", model, SendMessageOptions.RequireReceiver);
                break;
        }
    }
Esempio n. 33
0
 public UIEventArgs(UIEventType aEventType, MouseButton aMouseButton, KeyCode aKeyCode)
 {
     m_EventType = aEventType;
     m_MouseButton = aMouseButton;
     m_KeyCode = aKeyCode;
 }
Esempio n. 34
0
 public UIEventArgs(UIEventType aEventType, MouseButton aMouseButton)
 {
     m_EventType = aEventType;
     m_MouseButton = aMouseButton;
     m_KeyCode = KeyCode.None;
 }