Trying to place one of your text buttons next to another but my current (and likely incorrect) method of getting an Entity's width/height isn't working.

Code:
	pEnt = CreateTextButtonEntity(pBG, "Debug", x, y, "Debug Options"); 
	pEnt->GetShared()->GetFunction("OnButtonSelected")->sig_function.connect(&MainMenuOnSelect);
	pEnt->GetVar("alignment")->Set(uint32(ALIGNMENT_DOWN_LEFT));
	
	x += ((CL_Vec2f*)(pEnt->GetVar("size2d")))->x + space;

	pEnt = CreateTextButtonEntity(pBG, "Terrain", x, y, "3D Terrain"); 
	pEnt->GetShared()->GetFunction("OnButtonSelected")->sig_function.connect(&MainMenuOnSelect);
	pEnt->GetVar("alignment")->Set(uint32(ALIGNMENT_DOWN_LEFT));
Any ideas?