I have the following dialog, semi circle shape. I want to position buttons in it.
dialog.button(closeButton, false);
dialog.getContentTable().add(buttonS);
dialog.getContentTable().add(button);
dialog.getContentTable().add(hwTo);
The only way I am able to move a button is by using for a example
dialog.getContentTable().add(hwTo).pad(300);
But I don't want to pad anything, since it affects other buttons, I tried align
, button.setPosition
and whatnot, nothing works.
I was told to remove the table and ise Custom WidgetGroup. I removed the table, still having the same problem, nothing works except padding.
Answer
Your Dialog extends from Group, which means you can do dialog.addActor(myActor)
. Using addActor, you have a full control of the actor positions. You should go this way.
No comments:
Post a Comment