Exemplo n.º 1
0
        public virtual Vector3 GetWorldBodyPosition()
        {
            Vector3 bodyPos = _bodyPosition;

            if (_parent != null)
            {
                bodyPos += _parent.GetWorldContentPosition();
            }
            if (_parent is ScrollPanel)
            {
                ScrollPanel scrollPanel = (ScrollPanel)_parent;
                bodyPos += new Vector3(scrollPanel.GetScrolledAmount());
            }
            return(bodyPos);
        }
Exemplo n.º 2
0
        public virtual Vector3 GetWorldContentPosition()
        {
            Vector3 contentPos = GetContentPosition();

            if (_parent != null)
            {
                contentPos += _parent.GetWorldContentPosition();
            }
            if (_parent is ScrollPanel)
            {
                ScrollPanel scrollPanel = (ScrollPanel)_parent;
                Vector3     scroll      = new Vector3(scrollPanel.GetScrolledAmount());
                contentPos += scroll;
            }
            return(contentPos);
        }