this.stage = stage;
this.widget = widget;
if (widget != null) this.addActor(widget);
gestureDetector = new GestureDetector(new GestureListener() {
public boolean pan (int x, int y, int deltaX, int deltaY) {
amountX -= deltaX;
amountY += deltaY;
clamp();
return false;