Sunday, 15 June 2014

c++ - cocos2d-x ResolutionPolicy::SHOW_ALL show nice images instead of black gaps -



c++ - cocos2d-x ResolutionPolicy::SHOW_ALL show nice images instead of black gaps -

when in cocos2d-x set resolutionpolicy::show_all might appear black areas top-bottom or left-right sides. can cover black area nice images?

i don't think can add together areas.

instead solution build scene contain nice images want add. steps are:

use within appdelegate::applicationdidfinishlaunching() observe screen size:

ccsize framesize = peglview->getframesize();

set design resolution proportional framesize maintaining aspect ratio.

put "content" in mid. then, have calculate "black areas" , add together sprites cover them. maintain in mind different screen holes can different, need maths there , cover different hole sizes.

c++ cocos2d-x cocos2d-x-3.0

No comments:

Post a Comment