java - Libgdx how to set space between the check box and the text label -


i've created checkbox skin libgdx scene2d problem there no space between checkbox , text label , here code checkbox :

final checkbox vsynccheckbox = new checkbox("vsync", skin);         vsynccheckbox.setchecked(vsync());         vsynccheckbox.getcells().get(0).size(30, 30); 

and in table layout tried use spaceright(10); nothing happens :

table.add(vsynccheckbox).top().expandy().spaceright(10);  

here image on checkbox looks moment:

enter image description here

like can see checkbox , vsync stack on how provide space between them ?

this how solved similar problem:

table.add(yourbutton).padleft(distance).other_stuff; 

next time please refer the wiki table page solve problems of or relating table layout

if have problems in understanding concept turn on debugging

table.setdebug(true); 

if check box , label 1 single item, can put space " vsync" in declaration of object instead of "vsync".


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -