Sudoku_gui_pygame_old.py
def create_button(x, y, w, h, text1, callback):
    """A button is a dictionary that contains the relevant data.

    Consists of a rect, text surface and text rect, color and a
    callback function.
    """
    # The button is a dictionary consisting of the rect, text,
    # text rect, color and the callback function.
    text_surf = pg.font.Font(None, 25).render(text1, True, (255, 255, 255))
    button_rect = pg.Rect(x, y, w, h)
    text_rect = text_surf.get_rect(center=button_rect.center)
    button = {
        'rect': button_rect,
        'text': text_surf,
        'text rect': text_rect,
        'color': pg.Color('dodgerblue4'),
        'callback': callback,
    }
    return button
A button is a dictionary that contains the relevant data.

    Consists of a rect, text surface and text rect, color and a
    callback function.
    
A button is a dictionary that contains the relevant data.
Consists of a rect, text surface and text rect, color and a
callback function.
A button is a dictionary that contains the relevant data . Consists of a rect text surface and text rect color and a callback function .
def create_button(x, y, w, h, text1, callback):
    text_surf = pg.font.Font(None, 25).render(text1, True, (255, 255, 255))
    button_rect = pg.Rect(x, y, w, h)
    text_rect = text_surf.get_rect(center=button_rect.center)
    button = {
        'rect': button_rect,
        'text': text_surf,
        'text rect': text_rect,
        'color': pg.Color('dodgerblue4'),
        'callback': callback,
    }
    return button
def create_button ( x , y , w , h , text1 , callback ) : text_surf = pg . font . Font ( None , 25 ) . render ( text1 , True , ( 255 , 255 , 255 ) ) button_rect = pg . Rect ( x , y , w , h ) text_rect = text_surf . get_rect ( center = button_rect . center ) button = { 'rect' : button_rect , 'text' : text_surf , 'text rect' : text_rect , 'color' : pg . Color ( 'dodgerblue4' ) , 'callback' : callback , } return button
A button is a dictionary that contains the relevant data.
A button is a dictionary that contains the relevant data .
"""A button is a dictionary that contains the relevant data.

    Consists of a rect, text surface and text rect, color and a
    callback function.
    """ # The button is a dictionary consisting of the rect, text, # text rect, color and the callback function.
x
y
w
h
text1
callback