Ejemplo n.º 1
0
        private void LookScrollVievCenter(IEvent ievent)
        {
            var e = ievent as UIEvent_ElfSetGridLookIndex;

            if (e.Index == -1)
            {
                ElfScrollView.MoveToOffset(lastScrollViewPos, lastScrollViewOffset);
            }
            else
            {
                ElfScrollView.SetLookIndex(e.Index, false);
            }
        }
Ejemplo n.º 2
0
        private void LookScrollVievCenter(IEvent ievent)
        {
            var e = ievent as UIEvent_ElfSetGridLookIndex;

            if (e.Index == -1)
            {
                ElfScrollView.MoveToOffset(lastScrollViewPos, lastScrollViewOffset);
                // 特殊处理
                var loc = new Vector3();
                loc   = ElfScrollView.transform.localPosition;
                loc.x = 0;
                ElfScrollView.transform.localPosition = loc;
            }
            else
            {
                ElfScrollView.SetLookIndex(e.Index, false);
            }
        }
Ejemplo n.º 3
0
        private void ScrollCeter(IEvent ievent)
        {
            var e = ievent as UIEvent_StrongSetGridLookIndex;

            if (e.Type == 1)
            {
                lastScrollOffset = StrongScrollView.oldoffset;
                lastScrollPos    = StrongScrollView.transform.localPosition;
            }
            else if (e.Type == 0)
            {
                if (e.Index == -1)
                {
                    StrongScrollView.SetLookIndex(e.Index, false);
                }
                else
                {
                    StrongScrollView.MoveToOffset(lastScrollPos, lastScrollOffset);
                }
            }
        }