How can I make my scroll list scroll 1 item per button click?

Hello Unity Community,

Once again I come to this website in search of help. I am working on a scroll list that displays three items at once. Per button click I want to scroll one item in from the left or right depending if they click the right or left scroll button. I am really close to that functionality but there is a bit of inconsistency in my scroll list. Depending where I am in the scroll list the scroll list may or may not scroll 1 item. Sometimes it scrolls 2 items. I’ve been staring at this code all day and decided to ask the Unity Community. Please let me know if you help me in any sort.

So if this is my scroll list:
< | item 2 item 3 item 4 | >
I hit the left button ( < )
< | item 3 item 4 item 5 | > as you can see the list moved by 1 item.
But sometimes this happens
< | item 2 item 3 item 4 | >
I hit the left button ( < )
< | item 4 item 5 item 6 | > as you can see the list moved by 2 items.

Also I should note that my list has the ability to wrap and can continuously scroll if the left/right scroll button is held down. But I believe through many debug statements that doesn’t have any effect(affect?) on the inconsistency of the scrolling.

Oh, and I’m using the AnBSoft EZ GUI API using the UIScrollList.

If any one needs any addition details please ask I shall proved them.
Thank you very much Unity Community! Any help is greatly appreciated!!!

Here is how I scroll the items:

	public void gameScrollRight(){
		int currentIndex = (int)(gameScroller.ScrollPosition * gameScroller.Count);
		int toIndex = currentIndex + 2;
		print("SCROLL TO " + toIndex);
		if(toIndex >= gameScroller.Count) {
			toIndex = gameScroller.Count - 2;
			IUIListObject leftObj = gameScroller.GetItem(0);
			gameScroller.RemoveItem(0, false);
			gameScroller.AddItem(leftObj);
			leftObj.gameObject.SetActiveRecursively(true);
		}
		gameScroller.ScrollToItem(toIndex, .75f);
	}
	public void gameScrollLeft(){
		int currentIndex = (int)(gameScroller.ScrollPosition * gameScroller.Count);
		int toIndex = currentIndex - 2;
		print("SCROLL TO " + toIndex);
		if(toIndex < 0) {
			float itemWidth = gameScroller.ContentExtents / gameScroller.Count;
			toIndex = 0;
			IUIListObject rightObj = gameScroller.GetItem(gameScroller.Count - 1);
			rightObj.gameObject.SetActiveRecursively(true);
			gameScroller.RemoveItem(gameScroller.Count - 1, false);
			gameScroller.InsertItem(rightObj, 0);
			gameScroller.PositionItems();
			gameScroller.ScrollPosition += 1.0f / (gameScroller.Count - (gameScroller.viewableArea.x / itemWidth));
		}
		gameScroller.ScrollToItem(toIndex, .751f);
	}

try this:

	public void gameScrollRight(){
		
		int currentIndex = (int)(gameScroller.ScrollPosition * (gameScroller.Count - 2));
				
		int toIndex = currentIndex + 2;
		
		//print("SCROLL TO " + toIndex);
		if(toIndex >= (gameScroller.Count - 1)){
			
			toIndex = gameScroller.Count - 2; // sroll to before last
			IUIListObject leftObj = gameScroller.GetItem(0);
			
			gameScroller.RemoveItem(0, false);
			gameScroller.AddItem(leftObj);
			
			leftObj.gameObject.SetActiveRecursively(true);
		}
		
		gameScroller.ScrollToItem(toIndex, .75f);
	}
	
	public void gameScrollLeft() {
		int currentIndex = (int)(gameScroller.ScrollPosition * (gameScroller.Count - 2));

		int toIndex = currentIndex;
		//print("SCROLL TO " + toIndex);
		if(toIndex <= 0){
			toIndex = 1;
			//float itemWidth = gameScroller.ContentExtents / gameScroller.Count;
			
			IUIListObject rightObj = gameScroller.GetItem(gameScroller.Count - 1);
			rightObj.gameObject.SetActiveRecursively(true);
			
			gameScroller.RemoveItem(gameScroller.Count - 1, false);
			gameScroller.InsertItem(rightObj, 0);
			gameScroller.PositionItems();
			gameScroller.ScrollPosition += 1.0f / (gameScroller.Count - 2);
		}
		gameScroller.ScrollToItem(toIndex, 1f);
	}