Hello guys,
I set the frame size in the app delegate but it doesn’t change the size of the window in Visual Studio when I run the debug. Only resizing it manually (dragging the corners) does it. It also keeps the new size after I resize it manually on the next launch, but I can’t do anyting about it programmatically. So my question is probably more related to VS rather than cocos, how can I debug this properly and get my window size to be the same as the frame size I set programmatically.
Tried various of things code-wise, here it is just in case:
bool AppDelegate::applicationDidFinishLaunching() {
auto director = Director::getInstance();
auto mapSize = Sprite::create("map.jpg")->getContentSize();
auto glview = director->getOpenGLView();
if (!glview) {
auto glview = GLViewImpl::create("pacmanas");
glview->setFrameSize(mapSize.width, mapSize.height);
director->setOpenGLView(glview);
}
//director->getOpenGLView()->setFrameSize(mapSize.width, mapSize.height);
//glview->setFrameSize(1280, 1024);
//glview->setDesignResolutionSize(mapSize.width, mapSize.height, ResolutionPolicy::EXACT_FIT);
auto scene = GameScene::createScene();
director->runWithScene(scene);
return true;
}