关于Cocos2dx屏幕适配
来源:互联网 发布:浙大宁波软件学院 编辑:程序博客网 时间:2024/06/06 02:25
//在 bool AppDelegate::applicationDidFinishLaunching() 函数中加入 auto director = Director::getInstance(); auto glview = director->getOpenGLView();if (!glview) {glview = GLView::create("My Game");//设置分辨率glview->setFrameSize(480, 320);//code//这句必须最后,根据480,320来适配glview->setDesignResolutionSize(480, 320, kResolutionShowAll);director->setOpenGLView(glview);}
1 enum ResolutionPolicy 2 { 3 // The entire application is visible in the specified area without trying to preserve the original aspect ratio. 4 // Distortion can occur, and the application may appear stretched or compressed. 5 kResolutionExactFit, 6 // The entire application fills the specified area, without distortion but possibly with some cropping, 7 // while maintaining the original aspect ratio of the application. 8 kResolutionNoBorder, 9 // The entire application is visible in the specified area without distortion while maintaining the original10 // aspect ratio of the application. Borders can appear on two sides of the application.11 kResolutionShowAll,12 13 kResolutionUnKnown,14 };
0 0
- 关于Cocos2dx屏幕适配
- 关于cocos2dx的屏幕适配
- cocos2dx屏幕适配
- cocos2dx屏幕适配
- cocos2dx屏幕适配
- Cocos2dx屏幕适配
- Cocos2dx屏幕适配
- cocos2dx屏幕适配
- cocos2dx屏幕适配
- cocos2dx屏幕适配
- cocos2dx 屏幕适配
- cocos2dx屏幕适配
- cocos2dx 屏幕适配
- 关于cocos2dx 3.x自适配屏幕
- COCOS2DX屏幕显示与屏幕适配
- cocos2dx中的屏幕适配
- Cocos2dx游戏屏幕适配
- cocos2dx 屏幕适配策略
- CareerCup 递归与动态规划 Q9.10 最大高度堆箱子
- Storm 实战:构建大数据实时计算
- iOS archive(归档)的总结
- 安装redis
- Flex TextInput 动态判断输入内容
- 关于Cocos2dx屏幕适配
- ios 隐藏状态栏
- 关于ETL过程(1)
- 内部类与向上转型
- POJ 2528-Mayor's posters(线段树区间更新+离散化)
- NSURLConnection
- 安卓--屏幕适配介绍
- textarea 怎么区分自动换行和手动换行?
- Yii1.1应用升级到Yii2.0的一些注意点