SDK em uso: Cocos2d-x 3.0
Orientação: Retrato (não tenho certeza para paisagem)
Como usar:
- Adicione o método “setupResolutionPolicy” em AppDelegate.cpp
- Chame o método interno
AppDelegate::applicationDidFinishLaunching
logo apósdirector->setOpenGLView(eglView);
Método: setupResolutionPolicy
void setupResolutionPolicy(float designW, float designH)
{
Size screenSize = EGLView::getInstance()->getFrameSize();
float designRatio = designW / designH;
float screenRatio = screenSize.height / screenSize.width;
ResolutionPolicy resolutionPolicy = screenRatio < designRatio ?
ResolutionPolicy::FIXED_HEIGHT : ResolutionPolicy::FIXED_WIDTH;
EGLView::getInstance()->setDesignResolutionSize(designW, designH, resolutionPolicy);
}