def on_mouse_release(self, event):
        """If button collides, store its value and exit loop.

        Parameters
        ==========
        event (pygame.event.Event instance)
            event.type == pygame.MOUSEBUTTONUP;

            represents data about a button of the mouse
            being released; specifically, the left button,
            since event.button == 1;

            we use the value of its "pos" attribute which
            represents the position of the mouse when the
            mouse button was released to check whether a
            button from the dialog collided with the mouse.
        """
        ### retrieve the position of the mouse
        mouse_pos = event.pos

        ### iterate over the dialog buttons

        for button in self.buttons:

            ### if you find a colliding button, store its
            ### value and trigger the exit of the dialog
            ### loop
            ###
            ### you can also break out of the "for loop" in
            ### such case

            if button.rect.collidepoint(mouse_pos):

                self.value = button.value
                self.exit_loop()

                break

        else:

            if self.dismissable and not self.rect.collidepoint(mouse_pos):
                self.exit_dialog()
If button collides, store its value and exit loop.

        Parameters
        ==========
        event (pygame.event.Event instance)
            event.type == pygame.MOUSEBUTTONUP;

            represents data about a button of the mouse
            being released; specifically, the left button,
            since event.button == 1;

            we use the value of its "pos" attribute which
            represents the position of the mouse when the
            mouse button was released to check whether a
            button from the dialog collided with the mouse.
        
nodezator/dialog.py