private void OnSceneGroupGiftPressDown(GameObject btnStartGame)
        {
            //显示礼物列表
            GroupToolTipsDatas data = new GroupToolTipsDatas()
            {
                Datas     = m_gifts,
                ScreenPos = RectTransformUtility.WorldToScreenPoint(FrameMgr.Instance.UICamera, m_exp_reward_icon.Position) - new Vector2(0.0f, -60.0f * m_gifts.Count - 30.0f),
            };


            FrameMgr.OpenUIParams ui_data = new FrameMgr.OpenUIParams(UIDefine.UI_GROUP_TOOL_TIPS)
            {
                Param = data,
            };

            EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(ui_data);
        }
Example #2
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.sencond_pop.ToString());

            if (null != param)
            {
                GroupToolTipsDatas data = param as GroupToolTipsDatas;

                m_view.Refresh(data.Datas);

                Vector2 tip_pos;
                RectTransformUtility.ScreenPointToLocalPointInRectangle(m_root.Widget, data.ScreenPos, CameraManager.Instance.UICamera, out tip_pos);

                m_view.Widget.anchoredPosition = tip_pos;
                m_view.Visible = true;
            }
        }