loading widget from cocostudio results in different scale each time

Hi

I am trying to load a widget from a json I have build in cocostudio. Each time i load the json the loaded button shows in a different resolution on the display some times factor 4 sometimes factor 2 sometimes it does not show at all.
I am not changing anything in the code never the less the size of the button on the screen changes each time.

I usse the code below to load the screen:

Size visibleSize = Director::getInstance()->getVisibleSize();

Widget *startMenu = dynamic_cast<Layout*>(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("Home_StartMenu.json"));

if (startMenu == nullptr)
{
	return false;
}
startMenu->setPosition(Point(0, visibleSize.height - startMenu->getSize().height));

when I show the size of the button in the log it shows each time 40 pixel even so it is a different size each time.

the json is attached. Anybody an idea on what is going on?

HP


Home_StartMenu.json.zip (1.0 KB)