mirror of https://github.com/axmolengine/axmol.git
Merge pull request #3978 from HoGarfield/cc.RESOLUTION_POLICY
Add cc.RESOLUTION_POLICY to jsb_cocos2d.js,so it can use setDesignResolutionSize in cc.EGLView
This commit is contained in:
commit
feee6ca84b
|
@ -4,6 +4,30 @@
|
||||||
|
|
||||||
var cc = cc || {};
|
var cc = cc || {};
|
||||||
|
|
||||||
|
cc.RESOLUTION_POLICY = {
|
||||||
|
// The entire application is visible in the specified area without trying to preserve the original aspect ratio.
|
||||||
|
// Distortion can occur, and the application may appear stretched or compressed.
|
||||||
|
EXACT_FIT:0,
|
||||||
|
// The entire application fills the specified area, without distortion but possibly with some cropping,
|
||||||
|
// while maintaining the original aspect ratio of the application.
|
||||||
|
NO_BORDER:1,
|
||||||
|
// The entire application is visible in the specified area without distortion while maintaining the original
|
||||||
|
// aspect ratio of the application. Borders can appear on two sides of the application.
|
||||||
|
SHOW_ALL:2,
|
||||||
|
// The application takes the height of the design resolution size and modifies the width of the internal
|
||||||
|
// canvas so that it fits the aspect ratio of the device
|
||||||
|
// no distortion will occur however you must make sure your application works on different
|
||||||
|
// aspect ratios
|
||||||
|
FIXED_HEIGHT:3,
|
||||||
|
// The application takes the width of the design resolution size and modifies the height of the internal
|
||||||
|
// canvas so that it fits the aspect ratio of the device
|
||||||
|
// no distortion will occur however you must make sure your application works on different
|
||||||
|
// aspect ratios
|
||||||
|
FIXED_WIDTH:4,
|
||||||
|
|
||||||
|
UNKNOWN:5
|
||||||
|
};
|
||||||
|
|
||||||
cc.LANGUAGE_ENGLISH = 0;
|
cc.LANGUAGE_ENGLISH = 0;
|
||||||
cc.LANGUAGE_CHINESE = 1;
|
cc.LANGUAGE_CHINESE = 1;
|
||||||
cc.LANGUAGE_FRENCH = 2;
|
cc.LANGUAGE_FRENCH = 2;
|
||||||
|
|
Loading…
Reference in New Issue