A minus sign should be a plus sign in CCMenu's
alignItemsHorizontallyWithPadding:
In the second for loop of the method, the following code should be changed:
originally it is
float x = -width / 2.0f;
for (CCNode item : children_) {
item.setPosition(CGPoint.make(x + item.getContentSize().width * item.getScaleX() / 2.0f, 0));
x -= item.getContentSize().width * item.getScaleX() + padding;
}
But should be changed to:
float x = -width / 2.0f;
for (CCNode item : children_) {
item.setPosition(CGPoint.make(x + item.getContentSize().width * item.getScaleX() / 2.0f, 0));
x += item.getContentSize().width * item.getScaleX() + padding;
}
Original issue reported on code.google.com by ghemp...@gmail.com on 25 Jan 2011 at 5:55
Original issue reported on code.google.com by
ghemp...@gmail.com
on 25 Jan 2011 at 5:55