The last clicked button integer is a button index.
The buttons are ordered from first to last created. The first button
that was created in the dialog (the top button) has index 0, while
the button under it has index 1 and so on.
The index of the first button on the second dialog would have an
index of 0. The dialogs work independently, you can set them up
when you want and later show them at different occasions.