def on_mouse_motion(self, event):
        """If button collides, highlight it.

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

            represents data about a button the mouse
            pointer moving;

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

        ### iterate over the dialog buttons, setting
        ### text render settings to hovered if they
        ### collide and to normal if not

        for button in self.buttons:

            button.change_text_settings(
                HOVERED_BUTTON_SETTINGS
                if button.rect.collidepoint(mouse_pos)
                else NORMAL_BUTTON_SETTINGS
            )

        ### finally redraw the buttons
        self.buttons.draw()
If button collides, highlight it.

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

            represents data about a button the mouse
            pointer moving;

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