Search code examples
javalibgdx

How to disable button or any listerner


I have a few group of actor that contain some texture and button. I have a group that act like modal box that popup , overlay and occupy the whole screen. but I realize the actor that blocked by the modal box is still clickable. How do I disable it beside setting those 20+ button to untouchable?

Sample code

stage.addActor(slotMachine);
stage.addActor(payTableDialog);

payTableDialog.show();

Sample code of Dialog class

CustomDialog extends Group{

}

Solution

  • Set the size of the CutomDialoge Group(modal box) to Screen Size.

    group.setSize(screenWidth, screenHight);