# Function for minimizing labels to 1 liners
# Attribution: Anecdata (thanks!)
def make_my_label(font, anchor_point, anchored_position, scale, color):
    func_label = label.Label(font)
    func_label.anchor_point = anchor_point
    func_label.anchored_position = anchored_position
    func_label.scale = scale
    func_label.color = color
    return func_label

# Individual customizable position labels
# https://learn.adafruit.com/circuitpython-display-support-using-displayio/text
# name_label (FONT, (ANCHOR POINT), (ANCHOR POSITION), SCALE, COLOR)

hello_label = make_my_label(
    terminalio.FONT, (0.5, 1.0), (DISPLAY_WIDTH / 2, 15), 1, TEXT_WHITE
)
warning_label = make_my_label(
    terminalio.FONT, (0.5, 1.0), (DISPLAY_WIDTH / 2, DISPLAY_HEIGHT - 35), 3, TEXT_RED
)
warning_text_label = make_my_label(
    terminalio.FONT, (0.5, 1.0), (DISPLAY_WIDTH / 2, DISPLAY_HEIGHT - 5), 2, TEXT_RED
)
date_label = make_my_label(medium_font, (0.0, 0.0), (5, 5), 1, TEXT_LIGHTBLUE)
time_label = make_my_label(medium_font, (0.0, 0.0), (5, 25), 2, TEXT_LIGHTBLUE)
temp_label = make_my_label(medium_font, (1.0, 1.0), (475, 145), 2, TEXT_ORANGE)
temp_data_label = make_my_label(
    huge_font, (0.5, 1.0), (DISPLAY_WIDTH / 2, 200), 1, TEXT_ORANGE
)
temp_data_shadow = make_my_label(
    huge_font, (0.5, 1.0), (DISPLAY_WIDTH / 2 + 2, 200 + 2), 1, TEXT_BLACK
)
owm_temp_data_label = make_my_label(
    medium_font, (0.5, 1.0), (DISPLAY_WIDTH / 2, 100), 2, TEXT_LIGHTBLUE
)
owm_temp_data_shadow = make_my_label(
    medium_font, (0.5, 1.0), (DISPLAY_WIDTH / 2 + 2, 100 + 2), 2, TEXT_BLACK
)
humidity_label = make_my_label(
    medium_font, (0.0, 1.0), (5, DISPLAY_HEIGHT - 23), 1, TEXT_GRAY
)
humidity_data_label = make_my_label(
    medium_font, (0.0, 1.0), (5, DISPLAY_HEIGHT), 1, TEXT_ORANGE
)
owm_humidity_data_label = make_my_label(
    medium_font, (0.0, 1.0), (5, DISPLAY_HEIGHT - 55), 1, TEXT_LIGHTBLUE
)
barometric_label = make_my_label(
    medium_font, (1.0, 1.0), (470, DISPLAY_HEIGHT - 27), 1, TEXT_GRAY
)
barometric_data_label = make_my_label(
    medium_font, (1.0, 1.0), (470, DISPLAY_HEIGHT), 1, TEXT_ORANGE
)
owm_barometric_data_label = make_my_label(
    medium_font, (1.0, 1.0), (470, DISPLAY_HEIGHT - 55), 1, TEXT_LIGHTBLUE
)
owm_windspeed_label = make_my_label(
    medium_font, (1.0, 1.0), (DISPLAY_WIDTH - 5, 50), 1, TEXT_LIGHTBLUE
)
vbat_label = make_my_label(medium_font, (1.0, 1.0), (DISPLAY_WIDTH - 15, 20), 1, None)
plugbmp_label = make_my_label(terminalio.FONT, (1.0, 1.0), None, 1, None)
greenbmp_label = make_my_label(terminalio.FONT, (1.0, 1.0), None, 1, None)
bluebmp_label = make_my_label(terminalio.FONT, (1.0, 1.0), None, 1, None)
yellowbmp_label = make_my_label(terminalio.FONT, (1.0, 1.0), None, 1, None)
orangebmp_label = make_my_label(terminalio.FONT, (1.0, 1.0), None, 1, None)
redbmp_label = make_my_label(terminalio.FONT, (1.0, 1.0), None, 1, None)