FairyGUI.ScrollPane.ScrollToView C# (CSharp) Method

ScrollToView() public method

public ScrollToView ( GObject obj, bool ani, bool setFirst ) : void
obj GObject obj can be any object on stage, not limited to the direct child of this container.
ani bool If moving to target position with animation
setFirst bool If true, scroll to make the target on the top/left; If false, scroll to make the target any position in view.
return void
        public void ScrollToView(GObject obj, bool ani, bool setFirst)
        {
            _owner.EnsureBoundsCorrect();
            if (_needRefresh)
                Refresh();

            Rect rect = new Rect(obj.x, obj.y, obj.width, obj.height);
            if (obj.parent != _owner)
                rect = obj.parent.TransformRect(rect, _owner);
            ScrollToView(rect, ani, setFirst);
        }

Same methods

ScrollPane::ScrollToView ( GObject obj ) : void
ScrollPane::ScrollToView ( GObject obj, bool ani ) : void
ScrollPane::ScrollToView ( Rect rect, bool ani, bool setFirst ) : void