static cocos2d::Size designResolutionSize = cocos2d::Size(320, 480);
#define kButtonMargin 5
#define KNumberButtonPerRow 3
// The size of the button is 100x50
Size buttonSize = Size((this->getContentSize().width - kButtonMargin * 4) / KNumberButtonPerRow, 50.0);
on iPhone 4s it showing as it should while on other devies (iPhone 5, iPhone 6, iPhone 6 Plus, Android Nexus) the buttons are too large as you can see on the screenshot.
For buttons I’m using Scale9Sprite
where the size of the sprite is buttonSize
.
How can I fix this?