title: How to make a ScrollPane snap to certain positions
body: <p>I have a ScrollPane that has multiple images horizontally aligned in a Group. What I need is scroll horizontally in a way to "snap" to images when scrolling &amp; not just scroll to any amount needed. So after any swiping, the scrolling should stop to fit a whole image &amp; not half an image. Mainly each image width is equal to the scrollpane width.
  Any idea how to achieve this with libgdx ScrollPane?</p>
  
  <p>Here's a sample code:</p>
  
  <pre><code>Image imgWhite = new Image(white);
  imgWhite.setSize(width, height);
  imgWhite.setPosition(0, 0);
  
  Image imgYellow = new Image(white);
  imgYellow.setColor(Color.YELLOW);
  imgYellow.setSize(width, height);
  imgYellow.setPosition(width, 0);
  
  Image imgGreen = new Image(white);
  imgGreen.setColor(Color.GREEN);
  imgGreen.setSize(width, height);
  imgGreen.setPosition(2*width, 0);
  
  Group grp = new Group();
  grp.addActor(imgWhite);
  grp.addActor(imgGreen);
  grp.addActor(imgYellow);
  grp.setSize(3*width, height);
  
  ScrollPane scrollPane = new ScrollPane(grp);
  scrollPane.setSize(width, height);
  </code></pre>