From d3387f5ab24981f04507d0dbb9a30203a92f70fd Mon Sep 17 00:00:00 2001 From: "lunhao.guo" Date: Tue, 29 Dec 2015 15:24:21 +0800 Subject: [PATCH] change the resolution size of js template to (960 * 640) ,consistent with other templates --- .../frameworks/runtime-src/Classes/AppDelegate.cpp | 2 +- templates/js-template-default/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/js-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/js-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp index b2dfc0e959..3a8bdd4fb2 100644 --- a/templates/js-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/js-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -71,7 +71,7 @@ bool AppDelegate::applicationDidFinishLaunching() #if(CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) glview = cocos2d::GLViewImpl::create("HelloJavascript"); #else - glview = cocos2d::GLViewImpl::createWithRect("HelloJavascript", Rect(0,0,900,640)); + glview = cocos2d::GLViewImpl::createWithRect("HelloJavascript", Rect(0,0,960,640)); #endif director->setOpenGLView(glview); } diff --git a/templates/js-template-default/main.js b/templates/js-template-default/main.js index cf03d3beb3..1cc53ae4d2 100644 --- a/templates/js-template-default/main.js +++ b/templates/js-template-default/main.js @@ -61,7 +61,7 @@ cc.game.onStart = function(){ // Adjust viewport meta cc.view.adjustViewPort(true); // Setup the resolution policy and design resolution size - cc.view.setDesignResolutionSize(800, 450, cc.ResolutionPolicy.SHOW_ALL); + cc.view.setDesignResolutionSize(960, 640, cc.ResolutionPolicy.SHOW_ALL); // Instead of set design resolution, you can also set the real pixel resolution size // Uncomment the following line and delete the previous line. // cc.view.setRealPixelResolution(960, 640, cc.ResolutionPolicy.SHOW_ALL);