滑动层在800480整个屏幕可以正常拖动滚动层,但是换到480320后,就只有左下角一个小范围可以拖动滚动层?
添加代码,这是怎么回事啊
CCSize frameSize = Director::getInstance()->getOpenGLView()->getFrameSize();//获取屏幕大小
SCREEN_W = frameSize.width;
SCREEN_H = frameSize.height;
SCALE_X = (float)SCREEN_W/DESIGN_SCREEN_W;
SCALE_Y = (float)SCREEN_H/DESIGN_SCREEN_H;
Layer * layer = Layer::create();
Layout* _layout = static_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("Level_1/Level_1.json"));
layer->ignoreAnchorPointForPosition(false);
layer->setAnchorPoint(ccp(0,0));
layer->setScaleX(SCALE_X);
layer->setScaleY(SCALE_Y);
layer->addChild(_layout);
addChild(layer);