Пример #1
0
def _update_menu_screen():
    screen.clear()
    screen.line1(_sub_menus[_sub_menu_index].name, True)
    select_text = "SELECT"
    if hasattr(_sub_menus[_sub_menu_index], "get_select_text"):
        select_text = _sub_menus[_sub_menu_index].get_select_text()
    screen.line2(select_text, True)
Пример #2
0
def shutdown():
    screen.clear()
    screen.line1("Goodbye!", True)
    sleep(1)
    screen.stop()
    os.system("sudo poweroff")
    exit()
Пример #3
0
def greet():
    screen.clear()

    screen.add_custom_char(0, [
        "     ", " XXX ", "X   X", "     ", "     ", "     ", "     ", "     "
    ])

    screen.add_custom_char(1, [
        "     ", "     ", "     ", "     ", "X   X", " XXX ", "     ", "     "
    ])

    screen.add_custom_char(2, [
        "     ", "X    ", " X   ", "  X  ", " X   ", " X   ", "X    ", "     "
    ])

    screen.add_custom_char(3, [
        "     ", "  X  ", "  X  ", "  X  ", " X   ", " X   ", "X    ", "     "
    ])

    screen.add_custom_char(4, [
        "     ", "    X", "   X ", "  X  ", " X   ", " X   ", "X    ", "     "
    ])

    screen.clear()
    sleep(0.2)
    screen.line1("Hi, I'm Kass!", True, True)
    _wave()
    _wave()
    screen.clear()
    sleep(0.5)
Пример #4
0
 def update_display(self, editing=False):
     name = self.name
     if editing: name = "[" + name + "]"
     screen.line1(name, True)
     text, center = self.get_display_data_full()
     screen.line2(text, center)
Пример #5
0
 def update_display():
     screen.line1("[" + HandlerSelector.name + "]", True)
     screen.line2(HandlerSelector.get_handler().name, True)
Пример #6
0
 def update_display():
     screen.line1(ReplayViewer.files[ReplayViewer.file_index][:-5], True)
     screen.line2(
         "PRESS TO " + ("STOP" if ReplayViewer.playing else "PLAY"), True)