-
barabasandras1Likes 0Problem Description
I’m using this line in my AppDelegate.cpp:
glview->setDesignResolutionSize(768, 1136, ResolutionPolicy::NO_BORDER);
But every time I’m placing something in my GameScene, for example I need a sprite that is exactly as long as the screen, i Would use:
_topBox->setContentSize(Size(VSIZE_W, VSIZE_H * 0.2f));
Which is not good since VSIZE (defined in a Constants.h file, it is getVisibleSize().width and height) gives back the device’s size. My device’s with is 640, even tho Im using that setDesignResolutionSize. how to fix this? What code should I use to make things just as big as the screen? Or make the code think I’m using a 768*1136 device?
-
Sonar Systems adminLikes 0
Use getDesignResolutionSize
-
barabasandras1Likes 1
Thank you, I will try it asap.
Login to reply