.get(0).WIDTH) / 2.0);
int step = 2 * columnMargine + items.get(0).WIDTH;
firstItemLeft = columnMargine
- (int) (Math.ceil(selected / rows) * step);
Animation animation = new Animation() {
int move = (firstItemLeft - items.get(0).getLeft());
@Override
protected void onUpdate(double progress) {
moveButtons((int) (move * progress));
if (progress >= 1) {
animating = false;
setSize();
client
.updateVariable(paintableId, "cursor", selected,
true);
}
}
};
// softAnimationTime = 250 * (Math.abs(firstItemLeft
// - items.get(0).getLeft()) / 100);
animating = true;
animation.run(softAnimationTime);
}