java - libgdx Group is not affected by parent Table.row() -


i'm trying create in-game window, using table class. when added groups of images table, seems row() method has no influence groups, in same place. using images instead of groups works. ps. used group overlap images (kinda border hover effect), don't know better way that. thanks

public class mygroup extends group{         public  mygroup(image bg, image thumb){             this.addactor(bg);             this.addactor(thumb);         }     }  public class actionscreen extends table {   mygroup[] group =new mygroup[8]; (int i=0;i<8;i++){             group[i] =  new mygroup(new image(skin.getdrawable("item-bg")),new image(skin.getdrawable("item-bg-over")));             if (i==4){                 row();                 add(group[i]).top().padleft(100);             }             else{                 add(group[i]).top().padleft(100);             }         } 

group's, default, have 0 size, have manually set size.

in mygroup constructor, you'd want call this

this.setsize(bg.getwidth(), bg.getheight()); 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -