Add browse icons, fix apply_offset

This commit is contained in:
ABelliqueux 2024-03-20 19:27:58 +01:00
parent 6166140c12
commit 6dc317a1a7

View File

@ -55,25 +55,29 @@ ui_vol_y = 4
ui_vol_x = device.width - ui_vol_width - 8
ui_vol_icon_coords = (ui_vol_x - 10, 4)
ui_vol_icon_polygon = [0,3,3,3,8,0,8,8,3,5,0,5]
play_icon = [0,0,8,4,0,8]
pause_icon = [0,0,3,0,3,8,5,8,5,0,8,0,8,8,0,8]
stop_icon = [0,0,8,0,8,8,0,8]
next_icon = [0,0,3,3,3,0,8,4,3,8,3,5,0,8]
prev_icon = [0,4,3,0,3,3,8,0,8,8,3,5,3,8]
menu_icon = [0,0, 5,0, 4,1, 8,4, 6,6, 2,4, 0,6]
down_icon = [0,0, 8,0, 4,8]
up_icon = [0,8, 4,0, 8,8]
add_icon = [0,3, 3,3, 3,0, 6,0, 6,3, 8,3, 8,6, 6,6, 6,8, 3,8, 3,6, 0,6]
MODES_ORDER = ['playback', 'browse']
MODES = { 'playback' : dict(BTN_1=dict(FUNCTION='prev', ICON=prev_icon, XY=(((btn_width+1)*0.5), (menu_bar_y + 2)) ),
BTN_2=dict(FUNCTION='stop', ICON=[0,0,8,0,8,8,0,8], XY=(((btn_width+1)*1.5), (menu_bar_y + 2))),
BTN_3=dict(FUNCTION='toggle', ICON=[0,0,8,4,0,8], XY=(((btn_width+1)*2.5), (menu_bar_y + 2))),
BTN_4=dict(FUNCTION='next', ICON=[0,0,3,3,3,0,8,4,3,8,3,5,0,8], XY=(((btn_width+1)*3.5), (menu_bar_y + 2))),
BTN_5=dict(FUNCTION='menu', ICON=[0,0, 5,0, 4,2, 8,5, 10,10, 7,7, 2,4, 0,6], XY=(((btn_width+1)*4.5), (menu_bar_y + 2))),
BTN_2=dict(FUNCTION='stop', ICON=stop_icon, XY=(((btn_width+1)*1.5), (menu_bar_y + 2))),
BTN_3=dict(FUNCTION='toggle', ICON=play_icon, XY=(((btn_width+1)*2.5), (menu_bar_y + 2))),
BTN_4=dict(FUNCTION='next', ICON=next_icon, XY=(((btn_width+1)*3.5), (menu_bar_y + 2))),
BTN_5=dict(FUNCTION='menu', ICON=prev_icon, XY=(((btn_width+1)*4.5), (menu_bar_y + 2))),
),
'browse' : dict(BTN_1=dict(FUNCTION='none', ICON=[0,0,8,0,8,8,0,8], XY=(((btn_width+1)*0.5), (menu_bar_y + 2)) ),
BTN_2=dict(FUNCTION='none', ICON=[0,0,8,0,8,8,0,8], XY=(((btn_width+1)*1.5), (menu_bar_y + 2))),
BTN_3=dict(FUNCTION='none', ICON=[0,0,8,0,8,8,0,8], XY=(((btn_width+1)*2.5), (menu_bar_y + 2))),
BTN_4=dict(FUNCTION='none', ICON=[0,0,8,0,8,8,0,8], XY=(((btn_width+1)*3.5), (menu_bar_y + 2))),
BTN_5=dict(FUNCTION='menu', ICON=[0,0, 5,0, 4,2, 8,5, 10,10, 7,7, 2,4, 0,6], XY=(((btn_width+1)*4.5), (menu_bar_y + 2))),
'browse' : dict(BTN_1=dict(FUNCTION='none', ICON=down_icon, XY=(((btn_width+1)*0.5), (menu_bar_y + 2)) ),
BTN_2=dict(FUNCTION='none', ICON=up_icon, XY=(((btn_width+1)*1.5), (menu_bar_y + 2))),
BTN_3=dict(FUNCTION='none', ICON=add_icon, XY=(((btn_width+1)*2.5), (menu_bar_y + 2))),
BTN_4=dict(FUNCTION='none', ICON=play_icon, XY=(((btn_width+1)*3.5), (menu_bar_y + 2))),
BTN_5=dict(FUNCTION='menu', ICON=menu_icon, XY=(((btn_width+1)*4.5), (menu_bar_y + 2))),
),
}
# Becomes true when receiving SIGINT