So far our game is rather a portrait game, that needs to be said first. Its not supposed to run in landscape.
Its supposed to run on iOs and Android, Thus a number of slightly different resolutions need to be supported.
I used the cocos editor to set up some scenes and layers and used its pinning methods.
But pinning is needless if it does not react to different game sizes.
i came across this [topic][1]
[1]: Multi resolution Support for Cocos Studio 2 problem solved! :D
But it was not to helpfull.
i tried something like this:
var size = cc.winSize;
this.guiLayer = new GUILayer(); // where the layer comes from a cocos studio file
this.guiLayer.setContentSize(size);
this.addChild(this.guiLayer);
that also doesn´t work.
So, how do you get cocos studio elements with pinning to react to different device sizes then?
Main.js is setup like this (and yes i tried other resolution policys as well):
cc.game.onStart = function(){
cc.view.adjustViewPort(true);
cc.view.setDesignResolutionSize(768, 1024, cc.ResolutionPolicy.FIXED_HEIGHT);
cc.view.resizeWithBrowserSize(true);
//load resources
cc.LoaderScene.preload(g_resources, function () {
cc.director.runScene(new GameScene());
}, this);
};