FlatRedBall.Gui.ScrollBar.GetNumDown C# (CSharp) Method

GetNumDown() public method

Gets the index of the first element shown in a list given the position of the position bar.
Prior to this method being called, the SetView function must be called and the Sensitivity property must be set.
public GetNumDown ( ) : int
return int
        public int GetNumDown()
		{
            return mFirstVisibleIndex;

            /*
            if (mAlignment == ScrollBarAlignment.Vertical)
            {
                float topOfPosBarFromTopOfScrollBar = (float)(mPositionBar.Parent.ScaleY - 2 - (mPositionBar.WorldUnitRelativeY + mPositionBar.ScaleY));
                return (int)System.Math.Round(topOfPosBarFromTopOfScrollBar /
                              (2 * (mScaleY - 2) * mSensitivity));
            }
            else
            {
                float topOfPosBarFromTopOfScrollBar = (float)(mPositionBar.Parent.ScaleX - 2 - (mPositionBar.WorldUnitRelativeX + mPositionBar.ScaleX));
                return (int)System.Math.Round(topOfPosBarFromTopOfScrollBar /
                              (2 * (mScaleX - 2) * mSensitivity));

            }
            */

        }