Ejemplo n.º 1
0
def loop():
    if data["background_image"]:
        screen.image(data["background_image"])
    else:
        screen.fill(color="black")

    screen.text(data["location"], xy=(22, 30), align="left", color="white", font="HelveticaNeue-Bold.ttf", font_size=24)
    screen.text(data["temp"], xy=(22, 160), align="left", color="white", font="HelveticaNeue-Bold.ttf", font_size=70)
    screen.text(data["description"], xy=(22, 213), align="left", color="white", font="HelveticaNeue.ttf", font_size=22)
    screen.text("Now", xy=(300, 213), align="right", font="HelveticaNeue.ttf", font_size=22, color="white")
Ejemplo n.º 2
0
def loop():
    # drawing code here
    if ip_address:
        screen.image(ready_image)
        screen.text(
            ip_address,
            xy=(10, 230),
            align='bottomleft',
            color='white',
            font_size=10,
        )
    else:
        screen.image(no_network_image)
Ejemplo n.º 3
0
def loop():
    if data['background_image']:
        screen.image(data['background_image'])
    else:
        screen.fill(color='black')

    screen.text(
        data['location'],
        xy=(22, 30),
        align='left',
        color='white',
        font='HelveticaNeue-Bold.ttf',
        font_size=24,
    )
    screen.text(
        data['temp'],
        xy=(22, 160),
        align='left',
        color='white',
        font='HelveticaNeue-Bold.ttf',
        font_size=70,
    )
    screen.text(
        data['description'],
        xy=(22, 213),
        align='left',
        color='white',
        font='HelveticaNeue.ttf',
        font_size=22,
    )
    screen.text(
        data['current_date'],
        xy=(300, 190),
        align='right',
        font='HelveticaNeue.ttf',
        font_size=22,
        color='white',
    )
    screen.text(
        data['current_time'],
        xy=(300, 213),
        align='right',
        font='HelveticaNeue.ttf',
        font_size=22,
        color='white',
    )
Ejemplo n.º 4
0
def loop():
    if data['background_image']:
        screen.image(data['background_image'])
    else:
        screen.fill(color='black')

    screen.text (
        data['location'],
        xy=(22,30),
        align='left',
        color='white',
        font='HelveticaNeue-Bold.ttf',
        font_size=24,
    )
    screen.text (
        data['temp'],
        xy=(22,160),
        align='left',
        color='white',
        font='HelveticaNeue-Bold.ttf',
        font_size=70,
    )
    screen.text (
        data['description'],
        xy=(22,213),
        align='left',
        color='white',
        font='HelveticaNeue.ttf',
        font_size=22,
    )
    screen.text (
        data['current_date'],
        xy=(300,190),
        align='right',
        font='HelveticaNeue.ttf',
        font_size=22,
        color='white',
    )
    screen.text (
        data['current_time'],
        xy=(300,213),
        align='right',
        font='HelveticaNeue.ttf',
        font_size=22,
        color='white',
    )
Ejemplo n.º 5
0
def loop():
    for child in root[0]:
        name = child.get("name")
        position = child.find("position")
        align = child.get("align")
        xy = None
        if position is not None:
            xy = (int(position.get("x")), int(position.get("y")))
        if child.tag in ["text", "rectangle", "scroll_text"]:
            color_node = child.find("color")
            color = (int(color_node.get("red")), int(color_node.get("green")), int(color_node.get("blue")))
            if child.tag == "text":
                font_size = int(child.get("font_size"))
                text = child.find("text").text

                screen.text(text, color=color, xy=xy, align=align, font_size=font_size)
            elif child.tag == "scroll_text":
                font_size = int(child.get("font_size"))
                text = child.find("text").text
                hpos = int(child.get("hpos"))
                margin_node = child.find("margin")
                margin = (int(margin_node.get("left")), int(margin_node.get("right")))
                if name not in scroll_texts:
                    scroll_texts[name] = ScrollText(screen.surface, 
                    text, hpos, color, margin, font_size,
                    font=os.path.join(os.path.dirname(inspect.getfile(tingbot)), 'Geneva.ttf'))
                else:
                    scroll_texts[name].update_text(text)
                    scroll_texts[name].update()
            elif child.tag == "rectangle":
                size_node = child.find("size")
                align = child.get("align")
                size = (int(size_node.get("w")), int(size_node.get("h")))

                screen.rectangle(xy=xy, size=size, color=color, align=align)
        elif child.tag == "image":
            scale = float(child.get("scale"))
            src = child.get("src")
            screen.image(src, xy=xy, scale=scale, align=align)
Ejemplo n.º 6
0
def loop():
    if not gui.initialized:
        if config.MOUSE_VISIBLE:
            pygame.mouse.set_visible(config.MOUSE_VISIBLE)
        pygame.display.set_caption(localized_strings.title)
        gui.initialized = True
    perform_key_events()
    screen.fill(color=COLOR_BLUE_DARK)

    screen.image("res/images/banner-911778_1280.jpg", xy=(0, 0), align="top")

    if alarm.current_alarm is not None:
        # Alarm currently firing - Show the Alarm Page
        screen.text(ALARM_LABEL_TITLE["text"] % alarm.current_alarm,
                    xy=ALARM_LABEL_TITLE["xy"],
                    color=ALARM_LABEL_TITLE["color"],
                    font_size=ALARM_LABEL_TITLE["font_size"],
                    align=ALARM_LABEL_TITLE["align"])
        p.player.mute()
    else:
        for child in gui.root[gui.current_page - 1]:
            name = child.get("name")
            position = child.find("position")
            align = child.get("align")
            xy = None
            if position is not None:
                xy = (int(position.get("x")), int(position.get("y")))
            if child.tag in ["text", "rectangle", "scroll_text"]:
                color_node = child.find("color")
                color = (int(color_node.get("red")),
                         int(color_node.get("green")),
                         int(color_node.get("blue")))
                if child.tag == "text":
                    font_size = int(child.get("font_size"))
                    text = child.find("text").text
                    if name == "time":
                        text = gui.current_time
                    elif name == "date":
                        text = gui.current_date
                    elif name == "time_sep" and time.localtime(
                    ).tm_sec % 2 != 1:
                        continue
                    if gui.current_page == PAGE_INDEX_RADIO:
                        if child.get("name") == "station_name":
                            text = gui.radio_station_name_text + ''
                    screen.text(text,
                                color=color,
                                xy=xy,
                                align=align,
                                font_size=font_size)
                elif child.tag == "scroll_text":
                    font_size = int(child.get("font_size"))
                    text = child.find("text").text
                    hpos = int(child.get("hpos"))
                    margin_node = child.find("margin")
                    margin = (int(margin_node.get("left")),
                              int(margin_node.get("right")))
                    if gui.current_page == PAGE_INDEX_RADIO:
                        if name == "station_info":
                            text = gui.radio_station_info_text + ''
                    if name not in gui.scroll_texts:
                        gui.scroll_texts[name] = ScrollText(
                            screen.surface,
                            text,
                            hpos,
                            color,
                            margin,
                            font_size,
                            font=os.path.join(
                                os.path.dirname(inspect.getfile(tingbot)),
                                'Geneva.ttf'))
                    else:
                        gui.scroll_texts[name].update_text(text)
                        gui.scroll_texts[name].update()

                elif child.tag == "rectangle":
                    size_node = child.find("size")
                    align = child.get("align")
                    size = (int(size_node.get("w")), int(size_node.get("h")))

                    screen.rectangle(xy=xy,
                                     size=size,
                                     color=color,
                                     align=align)
            elif child.tag == "image":
                scale = float(child.get("scale"))
                src = child.get("src")
                screen.image(src, xy=xy, scale=scale, align=align)
Ejemplo n.º 7
0
def draw_radio_page():
    screen.text(
        gui.current_time,
        #xy=(160, 20),
        #font_size=40,
        #color=COLOR_BLUE_LIGHT,
        xy=PAGE_RADIO_TEXT_TIME["xy"],
        font_size=PAGE_RADIO_TEXT_TIME["font_size"],
        color=PAGE_RADIO_TEXT_TIME["color"],
        align=PAGE_RADIO_TEXT_TIME["align"])
    if time.localtime().tm_sec % 2 == 1:
        # Blink the time separator every second by
        # display it every other second
        screen.text(
            ":",
            #xy=(160, 20),
            #font_size=40,
            #color=COLOR_BLUE_LIGHT,
            xy=PAGE_RADIO_TEXT_TIME["xy"],
            font_size=PAGE_RADIO_TEXT_TIME["font_size"],
            color=PAGE_RADIO_TEXT_TIME["color"],
            align=PAGE_RADIO_TEXT_TIME["align"])
    screen.text(
        gui.current_date,
        #xy=(160, 50),
        #font_size=20,
        #color=COLOR_TAN
        xy=PAGE_RADIO_TEXT_DATE["xy"],
        font_size=PAGE_RADIO_TEXT_DATE["font_size"],
        color=PAGE_RADIO_TEXT_DATE["color"],
        align=PAGE_RADIO_TEXT_DATE["align"])

    # Radio Info Panel outer border
    screen.rectangle(
        #xy=(8,70),
        #size=(304,108),
        #color=COLOR_TAN,
        #align="topleft"
        xy=PAGE_RADIO_RECT_INFO_PANEL_OUTER["xy"],
        size=PAGE_RADIO_RECT_INFO_PANEL_OUTER["size"],
        color=PAGE_RADIO_RECT_INFO_PANEL_OUTER["color"],
        align=PAGE_RADIO_RECT_INFO_PANEL_OUTER["align"])

    # Radio Info Top Panel - playback buttons and info
    screen.rectangle(
        #xy=(10,72),
        #size=(300,69),
        #color=COLOR_BLUE_DARK,
        #align="topleft"
        xy=PAGE_RADIO_RECT_INFO_PANEL_TOP["xy"],
        size=PAGE_RADIO_RECT_INFO_PANEL_TOP["size"],
        color=PAGE_RADIO_RECT_INFO_PANEL_TOP["color"],
        align=PAGE_RADIO_RECT_INFO_PANEL_TOP["align"])

    # Radio Info Bottom Panel - Stream info (stream name and title/info)
    screen.rectangle(
        #xy=(10,143),
        #size=(300,33),
        #color=COLOR_BLUE_DARK,
        #align="topleft"
        xy=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["xy"],
        size=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["size"],
        color=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["color"],
        align=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["align"])

    # Setup of the Stream Name and Title/Info
    radio_info = '(none)'  # Initial value of the Stream Info
    station_name = p.player.get_name(
    )  # Get the Stream Name from the player output
    if station_name is None and 'name' in p.get_active_channel():
        # If the Stream Name could not be set/not yet set from the player output,
        # then set the Station Name to the name from the station list instead
        station_name = p.get_active_channel()['name']
    if p.player.title is not None:
        radio_info = p.player.title
    else:
        radio_info = '(none)'
    # if p.player.info is not None:
    # If the Player info is set, then try to get the latest StreamTitle (Info)
    # radio_info = p.player.info.get("StreamTitle")
    #else:
    # Otherwise, set the Info to the default "(none)" value
    #radio_info = '(none)'
    if radio_info is None:
        # If the Player info was set but the latest StreamTitle (Info) was not,
        # then set the Info to the default "(none)" value
        radio_info = '(none)'

    if current_coding is not None:
        # try decode the radio_info with the current coding
        # This is necessary with Windows systems where the
        # encoding is not Unicode or ASCII
        radio_info = radio_info.decode(current_coding)
        try:
            station_name = station_name.decode(current_coding)
        except Exception:
            station_name = p.get_active_channel()['name']

    # Update the Web Frontend API Data with the current radio info
    web_frontend.api_data["radio"]["station"] = station_name
    # p.get_active_channel()['name']
    web_frontend.api_data["radio"]["info"] = radio_info
    # radio_info = filter(onlyascii, radio_info)
    # radio_info = ''.join(c if is_ascii(c) else onlyascii(c) for c in radio_info)
    # radio_info = filter(lambda x: x in string.printable, radio_info)

    # Draw the Station Name at the start/top in the bottom info panel
    screen.text(
        station_name,
        #xy=(13, 143),
        #font_size=15,
        #color=COLOR_TAN,
        #align="topleft"
        xy=PAGE_RADIO_TEXT_STATION_NAME["xy"],
        font_size=PAGE_RADIO_TEXT_STATION_NAME["font_size"],
        color=PAGE_RADIO_TEXT_STATION_NAME["color"],
        align=PAGE_RADIO_TEXT_STATION_NAME["align"])

    # Draw the Station Info at the end/bottom in the bottom info panel
    if gui.radio_info_scroll_text is None:
        gui.radio_info_scroll_text = ScrollText(
            screen.surface,
            radio_info,
            159,
            COLOR_BLUE_LIGHT, (12, 12),
            15,
            font=os.path.join(os.path.dirname(inspect.getfile(tingbot)),
                              'Geneva.ttf'))
    else:
        gui.radio_info_scroll_text.update_text(radio_info)
        gui.radio_info_scroll_text.update()
        # pygame.display.flip()
    #screen.text(
    #    radio_info,
    #    xy=(12, 159),
    #    font_size=15,
    #    color=COLOR_BLUE_LIGHT,
    #    align="topleft"
    #)

    # Play Button - Drawn at the left in the top info panel
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_play_circle_outline_white_24dp.png",
        #xy=(21,81),
        #align="topleft"
        PAGE_RADIO_BUTTON_PLAY["src"],
        xy=PAGE_RADIO_BUTTON_PLAY["xy"],
        scale=PAGE_RADIO_BUTTON_PLAY["scale"],
        align=PAGE_RADIO_BUTTON_PLAY["align"])

    # Pause button - Drawn to the right of the Play button in the top info panel
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_pause_circle_outline_white_24dp.png",
        #xy=(81,81),
        #align="topleft"
        PAGE_RADIO_BUTTON_PAUSE["src"],
        xy=PAGE_RADIO_BUTTON_PAUSE["xy"],
        scale=PAGE_RADIO_BUTTON_PAUSE["scale"],
        align=PAGE_RADIO_BUTTON_PAUSE["align"])

    # Previous Station button - Drawn at the bottom left of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_skip_previous_white_24dp.png",
        #xy=(11,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_STATION_PREV["src"],
        xy=PAGE_RADIO_BUTTON_STATION_PREV["xy"],
        scale=PAGE_RADIO_BUTTON_STATION_PREV["scale"],
        align=PAGE_RADIO_BUTTON_STATION_PREV["align"])

    # Next Station button - Drawn to the right of the Previous Station button
    #                       at the bottom of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_skip_next_white_24dp.png",
        #xy=(71,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_STATION_NEXT["src"],
        xy=PAGE_RADIO_BUTTON_STATION_NEXT["xy"],
        scale=PAGE_RADIO_BUTTON_STATION_NEXT["scale"],
        align=PAGE_RADIO_BUTTON_STATION_NEXT["align"])

    # Volume Down button - Drawn to the right of the Next Station button at
    #                      the bottom center of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_volume_down_white_24dp.png",
        #xy=(131,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_VOL_DOWN["src"],
        xy=PAGE_RADIO_BUTTON_VOL_DOWN["xy"],
        scale=PAGE_RADIO_BUTTON_VOL_DOWN["scale"],
        align=PAGE_RADIO_BUTTON_VOL_DOWN["align"])

    # Volume Up button - Drawn to the right of the Volume Down button at
    #                    the bottom of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_volume_up_white_24dp.png",
        #xy=(191,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_VOL_UP["src"],
        xy=PAGE_RADIO_BUTTON_VOL_UP["xy"],
        scale=PAGE_RADIO_BUTTON_VOL_UP["scale"],
        align=PAGE_RADIO_BUTTON_VOL_UP["align"])

    # Volume Mute button - Drawn at the bottom right of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_volume_mute_white_24dp.png",
        #xy=(251,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_VOL_MUTE["src"],
        xy=PAGE_RADIO_BUTTON_VOL_MUTE["xy"],
        scale=PAGE_RADIO_BUTTON_VOL_MUTE["scale"],
        align=PAGE_RADIO_BUTTON_VOL_MUTE["align"])
Ejemplo n.º 8
0
def loop():
    if not gui.initialized:
        if config.MOUSE_VISIBLE:
            pygame.mouse.set_visible(config.MOUSE_VISIBLE)
        pygame.display.set_caption(localized_strings.title)
        gui.initialized = True
    perform_key_events()
    screen.fill(
        color=COLOR_BLUE_DARK
    )

    screen.image(
        "res/images/banner-911778_1280.jpg",
        xy=(0,0),
        align="top"
    )

    if alarm.current_alarm is not None:
        # Alarm currently firing - Show the Alarm Page
        screen.text(
            ALARM_LABEL_TITLE["text"] % alarm.current_alarm,
            xy=ALARM_LABEL_TITLE["xy"],
            color=ALARM_LABEL_TITLE["color"],
            font_size=ALARM_LABEL_TITLE["font_size"],
            align=ALARM_LABEL_TITLE["align"]
        )
        p.player.mute()
    else:
        for child in gui.root[gui.current_page-1]:
            name = child.get("name")
            position = child.find("position")
            align = child.get("align")
            xy = None
            if position is not None:
                xy = (int(position.get("x")), int(position.get("y")))
            if child.tag in ["text", "rectangle", "scroll_text"]:
                color_node = child.find("color")
                color = (int(color_node.get("red")), int(color_node.get("green")), int(color_node.get("blue")))
                if child.tag == "text":
                    font_size = int(child.get("font_size"))
                    text = child.find("text").text
                    if name == "time":
                        text = gui.current_time
                    elif name == "date":
                        text = gui.current_date
                    elif name == "time_sep" and time.localtime().tm_sec%2 != 1:
                        continue
                    if gui.current_page == PAGE_INDEX_RADIO:
                        if child.get("name") == "station_name":
                            text = gui.radio_station_name_text + ''
                    screen.text(text, color=color, xy=xy, align=align, font_size=font_size)
                elif child.tag == "scroll_text":
                    font_size = int(child.get("font_size"))
                    text = child.find("text").text
                    hpos = int(child.get("hpos"))
                    margin_node = child.find("margin")
                    margin = (int(margin_node.get("left")), int(margin_node.get("right")))
                    if gui.current_page == PAGE_INDEX_RADIO:
                        if name == "station_info":
                            text = gui.radio_station_info_text + ''
                    if name not in gui.scroll_texts:
                        gui.scroll_texts[name] = ScrollText(screen.surface, 
                        text, hpos, color, margin, font_size,
                        font=os.path.join(os.path.dirname(inspect.getfile(tingbot)), 'Geneva.ttf'))
                    else:
                        gui.scroll_texts[name].update_text(text)
                        gui.scroll_texts[name].update()

                    
                elif child.tag == "rectangle":
                    size_node = child.find("size")
                    align = child.get("align")
                    size = (int(size_node.get("w")), int(size_node.get("h")))

                    screen.rectangle(xy=xy, size=size, color=color, align=align)
            elif child.tag == "image":
                scale = float(child.get("scale"))
                src = child.get("src")
                screen.image(src, xy=xy, scale=scale, align=align)
Ejemplo n.º 9
0
def draw_radio_page():
    screen.text(
        gui.current_time,
        #xy=(160, 20),
        #font_size=40,
        #color=COLOR_BLUE_LIGHT,
        xy=PAGE_RADIO_TEXT_TIME["xy"],
        font_size=PAGE_RADIO_TEXT_TIME["font_size"],
        color=PAGE_RADIO_TEXT_TIME["color"],
        align=PAGE_RADIO_TEXT_TIME["align"]
    )
    if time.localtime().tm_sec%2 == 1:
        # Blink the time separator every second by
        # display it every other second
        screen.text(
            ":",
            #xy=(160, 20),
            #font_size=40,
            #color=COLOR_BLUE_LIGHT,
            xy=PAGE_RADIO_TEXT_TIME["xy"],
            font_size=PAGE_RADIO_TEXT_TIME["font_size"],
            color=PAGE_RADIO_TEXT_TIME["color"],
            align=PAGE_RADIO_TEXT_TIME["align"]
        )
    screen.text(
        gui.current_date,
        #xy=(160, 50),
        #font_size=20,
        #color=COLOR_TAN
        xy=PAGE_RADIO_TEXT_DATE["xy"],
        font_size=PAGE_RADIO_TEXT_DATE["font_size"],
        color=PAGE_RADIO_TEXT_DATE["color"],
        align=PAGE_RADIO_TEXT_DATE["align"]
    )

    # Radio Info Panel outer border
    screen.rectangle(
        #xy=(8,70),
        #size=(304,108),
        #color=COLOR_TAN,
        #align="topleft"
        xy=PAGE_RADIO_RECT_INFO_PANEL_OUTER["xy"],
        size=PAGE_RADIO_RECT_INFO_PANEL_OUTER["size"],
        color=PAGE_RADIO_RECT_INFO_PANEL_OUTER["color"],
        align=PAGE_RADIO_RECT_INFO_PANEL_OUTER["align"]
    )

    # Radio Info Top Panel - playback buttons and info
    screen.rectangle(
        #xy=(10,72),
        #size=(300,69),
        #color=COLOR_BLUE_DARK,
        #align="topleft"
        xy=PAGE_RADIO_RECT_INFO_PANEL_TOP["xy"],
        size=PAGE_RADIO_RECT_INFO_PANEL_TOP["size"],
        color=PAGE_RADIO_RECT_INFO_PANEL_TOP["color"],
        align=PAGE_RADIO_RECT_INFO_PANEL_TOP["align"]
    )

    # Radio Info Bottom Panel - Stream info (stream name and title/info)
    screen.rectangle(
        #xy=(10,143),
        #size=(300,33),
        #color=COLOR_BLUE_DARK,
        #align="topleft"
        xy=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["xy"],
        size=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["size"],
        color=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["color"],
        align=PAGE_RADIO_RECT_INFO_PANEL_BOTTOM["align"]
    )

    # Setup of the Stream Name and Title/Info
    radio_info = '(none)' # Initial value of the Stream Info
    station_name = p.player.get_name() # Get the Stream Name from the player output
    if station_name is None and 'name' in p.get_active_channel():
        # If the Stream Name could not be set/not yet set from the player output,
        # then set the Station Name to the name from the station list instead
        station_name = p.get_active_channel()['name']
    if p.player.title is not None:
        radio_info = p.player.title
    else:
        radio_info = '(none)'
    # if p.player.info is not None:
        # If the Player info is set, then try to get the latest StreamTitle (Info)
        # radio_info = p.player.info.get("StreamTitle")
    #else:
        # Otherwise, set the Info to the default "(none)" value
        #radio_info = '(none)'
    if radio_info is None:
        # If the Player info was set but the latest StreamTitle (Info) was not,
        # then set the Info to the default "(none)" value
        radio_info = '(none)'

    if current_coding is not None:
        # try decode the radio_info with the current coding
        # This is necessary with Windows systems where the
        # encoding is not Unicode or ASCII
        radio_info = radio_info.decode(current_coding)
        try:
            station_name = station_name.decode(current_coding)
        except Exception:
            station_name = p.get_active_channel()['name']

    # Update the Web Frontend API Data with the current radio info
    web_frontend.api_data["radio"]["station"] = station_name
    # p.get_active_channel()['name']
    web_frontend.api_data["radio"]["info"] = radio_info
    # radio_info = filter(onlyascii, radio_info)
    # radio_info = ''.join(c if is_ascii(c) else onlyascii(c) for c in radio_info) 
    # radio_info = filter(lambda x: x in string.printable, radio_info)

    # Draw the Station Name at the start/top in the bottom info panel
    screen.text(
        station_name,
        #xy=(13, 143),
        #font_size=15,
        #color=COLOR_TAN,
        #align="topleft"
        xy=PAGE_RADIO_TEXT_STATION_NAME["xy"],
        font_size=PAGE_RADIO_TEXT_STATION_NAME["font_size"],
        color=PAGE_RADIO_TEXT_STATION_NAME["color"],
        align=PAGE_RADIO_TEXT_STATION_NAME["align"]
    )

    # Draw the Station Info at the end/bottom in the bottom info panel
    if gui.radio_info_scroll_text is None:
        gui.radio_info_scroll_text = ScrollText(screen.surface, 
        radio_info, 159, COLOR_BLUE_LIGHT, (12,12), 15,
        font=os.path.join(os.path.dirname(inspect.getfile(tingbot)), 'Geneva.ttf'))
    else:
        gui.radio_info_scroll_text.update_text(radio_info)
        gui.radio_info_scroll_text.update()
        # pygame.display.flip()
    #screen.text(
    #    radio_info,
    #    xy=(12, 159),
    #    font_size=15,
    #    color=COLOR_BLUE_LIGHT,
    #    align="topleft"
    #)

    # Play Button - Drawn at the left in the top info panel
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_play_circle_outline_white_24dp.png",
        #xy=(21,81),
        #align="topleft"
        PAGE_RADIO_BUTTON_PLAY["src"],
        xy=PAGE_RADIO_BUTTON_PLAY["xy"],
        scale=PAGE_RADIO_BUTTON_PLAY["scale"],
        align=PAGE_RADIO_BUTTON_PLAY["align"]
    )

    # Pause button - Drawn to the right of the Play button in the top info panel
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_pause_circle_outline_white_24dp.png",
        #xy=(81,81),
        #align="topleft"
        PAGE_RADIO_BUTTON_PAUSE["src"],
        xy=PAGE_RADIO_BUTTON_PAUSE["xy"],
        scale=PAGE_RADIO_BUTTON_PAUSE["scale"],
        align=PAGE_RADIO_BUTTON_PAUSE["align"]
    )

    # Previous Station button - Drawn at the bottom left of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_skip_previous_white_24dp.png",
        #xy=(11,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_STATION_PREV["src"],
        xy=PAGE_RADIO_BUTTON_STATION_PREV["xy"],
        scale=PAGE_RADIO_BUTTON_STATION_PREV["scale"],
        align=PAGE_RADIO_BUTTON_STATION_PREV["align"]
    )

    # Next Station button - Drawn to the right of the Previous Station button 
    #                       at the bottom of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_skip_next_white_24dp.png",
        #xy=(71,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_STATION_NEXT["src"],
        xy=PAGE_RADIO_BUTTON_STATION_NEXT["xy"],
        scale=PAGE_RADIO_BUTTON_STATION_NEXT["scale"],
        align=PAGE_RADIO_BUTTON_STATION_NEXT["align"]
    )

    # Volume Down button - Drawn to the right of the Next Station button at 
    #                      the bottom center of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_volume_down_white_24dp.png",
        #xy=(131,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_VOL_DOWN["src"],
        xy=PAGE_RADIO_BUTTON_VOL_DOWN["xy"],
        scale=PAGE_RADIO_BUTTON_VOL_DOWN["scale"],
        align=PAGE_RADIO_BUTTON_VOL_DOWN["align"]
    )

    # Volume Up button - Drawn to the right of the Volume Down button at 
    #                    the bottom of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_volume_up_white_24dp.png",
        #xy=(191,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_VOL_UP["src"],
        xy=PAGE_RADIO_BUTTON_VOL_UP["xy"],
        scale=PAGE_RADIO_BUTTON_VOL_UP["scale"],
        align=PAGE_RADIO_BUTTON_VOL_UP["align"]
    )

    # Volume Mute button - Drawn at the bottom right of the screen window
    screen.image(
        #"res/icons/material-design-icons-2.0/av/2x_web/ic_volume_mute_white_24dp.png",
        #xy=(251,181),
        #align="topleft"
        PAGE_RADIO_BUTTON_VOL_MUTE["src"],
        xy=PAGE_RADIO_BUTTON_VOL_MUTE["xy"],
        scale=PAGE_RADIO_BUTTON_VOL_MUTE["scale"],
        align=PAGE_RADIO_BUTTON_VOL_MUTE["align"]
    )