0
\$\begingroup\$

I have the following dialog, semi circle shape. I want to position buttons in it.

enter image description here

        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.

\$\endgroup\$
1
+50
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.