def generate_text(font, text, colour, bg_colour, centre_point):
    """
    Returns the Rect and Surface of a text
    Source: http://inventwithpython.com/makinggames.pdf

    :arg
        font: the basic font of the pygame project
        text: the string text that will be displayed
        colour: a tuple of an RGB value
        bg_colour: the background colour to apply to the button
        centre_point: the point at which the rect will be centred at

    :return
        text_display: the pygame.surface of the button
        text_rect: the pygame.rect of the button
    """
    text_display = font.render(text, True, colour, bg_colour)

    text_rect = text_display.get_rect()
    text_rect.center = centre_point

    return text_display, text_rect