Dialog dialog = new Dialog("Warning", skin, "dialog") {
    public void result(Object obj) {
        System.out.println("result "+obj);
        if(obj == true) {
            >> abort the dialog closing ? <<
dialog.button("Yes", true);
dialog.button("No", false);
dialog.key(Keys.Enter, true);

how to abort the closing of the dialog?


The documentation notes that when the result method is called, the dialog will be hidden unless cancel() is called.

So you'll want to invoke dialog.cancel() within your result callback somewhere.


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.