def METHOD_NAME(self, event: pygame.event.Event) -> bool:
    """
    Process any events relevant to the message window. In this case we just close the window
    when the dismiss button is pressed.
    :param event: a pygame.Event.
    :return: Return True if we 'consumed' this event and don't want to pass it on to the rest
             of the UI.
    """
    consumed_event = super().METHOD_NAME(event)
    if event.type == UI_BUTTON_PRESSED and event.ui_element == self.dismiss_button:
        self.kill()
    return consumed_event