def _menu_register_callbacks():
    buttons.init_button_mapping()
    buttons.register(defines.BTN_A, _menu_select_callback)
    buttons.register(defines.BTN_B, _menu_back_callback)
    buttons.register(defines.BTN_UP, _menu_up_callback)
    buttons.register(defines.BTN_DOWN, _menu_down_callback)
    buttons.register(defines.BTN_LEFT, _menu_left_callback)
    buttons.register(defines.BTN_RIGHT, _menu_right_callback)
def _text_input_register_callbacks():
    buttons.init_button_mapping()
    buttons.register(defines.BTN_A, _text_input_confirm_callback)
    buttons.register(defines.BTN_B, _text_input_cancel_callback)
    buttons.register(defines.BTN_UP, _text_input_up_callback)
    buttons.register(defines.BTN_DOWN, _text_input_down_callback)
    buttons.register(defines.BTN_LEFT, _text_input_left_callback)
    buttons.register(defines.BTN_RIGHT, _text_input_right_callback)
Пример #3
0
def start():
    global options
    global install_path
    options = None
    install_path = None

    buttons.init_button_mapping()
    buttons.register(defines.BTN_A, input_A)
    buttons.register(defines.BTN_B, input_B)
    buttons.register(defines.BTN_UP, input_up)
    buttons.register(defines.BTN_DOWN, input_down)
    buttons.register(defines.BTN_LEFT, input_left)
    buttons.register(defines.BTN_RIGHT, input_right)

    populate_apps()
    render_current_app()
Пример #4
0
def skippabletext(text, color=(255, 255, 255), pos=None, width=rgb.PANEL_WIDTH):
    
    buttons.init_button_mapping()
    buttons.register(defines.BTN_A, _abort_scroll)
    buttons.register(defines.BTN_B, _abort_scroll)

    rgb.scrolltext(text,color,pos,width)
    framerate = rgb.current_framerate #scroll time per pixel
    length_text_pixels = rgb.textwidth(text)
    delay_loop = (1 / framerate) * (length_text_pixels+10) * 10
    global abort
    abort = False

    while (not abort) and (delay_loop >= 0):
        time.sleep(0.1)
        delay_loop -= 1

    buttons.clear_button_mapping()
def _confirmation_dialog_register_callbacks():
    buttons.init_button_mapping()
    buttons.register(defines.BTN_A, _confirmation_dialog_yes_callback)
    buttons.register(defines.BTN_B, _confirmation_dialog_no_callback)