implement L and R as extra menus instead of extra keys for X (#148)
L is now the sorting menu R is unused
This commit is contained in:
@@ -98,27 +98,51 @@ Instructions_s install_instructions = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Instructions_s extra_instructions = {
|
Instructions_s extra_instructions[3] = {
|
||||||
.info_line = L"Release \uE002 to cancel or hold \uE006 and release \uE002 to do stuff",
|
{
|
||||||
.info_line_color = COLOR_WHITE,
|
.info_line = L"Release \uE002 to cancel or hold \uE006 and release \uE002 to sort",
|
||||||
.instructions = {
|
.info_line_color = COLOR_WHITE,
|
||||||
{
|
.instructions = {
|
||||||
L"\uE079 Jump in the list",
|
{
|
||||||
L"\uE07A Reload broken icons"
|
L"\uE079 Sort by name",
|
||||||
},
|
L"\uE07A Sort by author"
|
||||||
{
|
},
|
||||||
L"\uE07B Browse ThemePlaza",
|
{
|
||||||
L"\uE07C Sort by filename"
|
L"\uE07B Sort by filename",
|
||||||
},
|
NULL
|
||||||
{
|
},
|
||||||
L"\uE004 Sort by name",
|
{
|
||||||
L"\uE005 Sort by author"
|
NULL,
|
||||||
},
|
NULL
|
||||||
{
|
},
|
||||||
L"Exit",
|
{
|
||||||
NULL
|
L"Exit",
|
||||||
|
NULL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
.info_line = L"Release \uE002 to cancel or hold \uE006 and release \uE002 to do stuff",
|
||||||
|
.info_line_color = COLOR_WHITE,
|
||||||
|
.instructions = {
|
||||||
|
{
|
||||||
|
L"\uE079 Jump in the list",
|
||||||
|
L"\uE07A Reload broken icons"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
L"\uE07B Browse ThemePlaza",
|
||||||
|
NULL,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
L"\uE004 Sorting menu",
|
||||||
|
NULL
|
||||||
|
},
|
||||||
|
{
|
||||||
|
L"Exit",
|
||||||
|
NULL
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -347,7 +347,19 @@ int main(void)
|
|||||||
if(install_mode)
|
if(install_mode)
|
||||||
instructions = install_instructions;
|
instructions = install_instructions;
|
||||||
if(extra_mode)
|
if(extra_mode)
|
||||||
instructions = extra_instructions;
|
{
|
||||||
|
int index = 1;
|
||||||
|
bool key_l = (kDown | kHeld) & KEY_L;
|
||||||
|
bool key_r = (kDown | kHeld) & KEY_R;
|
||||||
|
if(key_l ^ key_r)
|
||||||
|
{
|
||||||
|
if(key_l)
|
||||||
|
index = 0;
|
||||||
|
// else if(key_r) // uncomment when we use the right menu. we don't for now
|
||||||
|
// index = 2;
|
||||||
|
}
|
||||||
|
instructions = extra_instructions[index];
|
||||||
|
}
|
||||||
|
|
||||||
if(qr_mode) take_picture();
|
if(qr_mode) take_picture();
|
||||||
else if(preview_mode) draw_preview(TEXTURE_PREVIEW, preview_offset);
|
else if(preview_mode) draw_preview(TEXTURE_PREVIEW, preview_offset);
|
||||||
@@ -527,42 +539,50 @@ int main(void)
|
|||||||
extra_mode = false;
|
extra_mode = false;
|
||||||
if(!extra_mode)
|
if(!extra_mode)
|
||||||
{
|
{
|
||||||
if((kDown | kHeld) & KEY_DLEFT)
|
bool key_l = (kDown | kHeld) & KEY_L;
|
||||||
|
bool key_r = (kDown | kHeld) & KEY_R;
|
||||||
|
if(!(key_l ^ key_r))
|
||||||
{
|
{
|
||||||
browse_themeplaza:
|
if((kDown | kHeld) & KEY_DLEFT)
|
||||||
if(themeplaza_browser(current_mode))
|
|
||||||
{
|
{
|
||||||
current_mode = MODE_THEMES;
|
browse_themeplaza:
|
||||||
load_lists(lists);
|
if(themeplaza_browser(current_mode))
|
||||||
|
{
|
||||||
|
current_mode = MODE_THEMES;
|
||||||
|
load_lists(lists);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if((kDown | kHeld) & KEY_DUP)
|
||||||
|
{
|
||||||
|
jump:
|
||||||
|
jump_menu(current_list);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if((kDown | kHeld) & KEY_DDOWN)
|
||||||
|
{
|
||||||
|
load_icons_first(current_list, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if((kDown | kHeld) & KEY_DUP)
|
else if(key_l)
|
||||||
{
|
{
|
||||||
jump:
|
if((kDown | kHeld) & KEY_DLEFT)
|
||||||
jump_menu(current_list);
|
{
|
||||||
|
sort_path:
|
||||||
}
|
sort_by_filename(current_list);
|
||||||
else if((kDown | kHeld) & KEY_DRIGHT)
|
load_icons_first(current_list, false);
|
||||||
{
|
}
|
||||||
sort_path:
|
else if(((kDown | kHeld)) & KEY_DUP)
|
||||||
sort_by_filename(current_list);
|
{
|
||||||
load_icons_first(current_list, false);
|
sort_name:
|
||||||
}
|
sort_by_name(current_list);
|
||||||
else if((kDown | kHeld) & KEY_DDOWN)
|
load_icons_first(current_list, false);
|
||||||
{
|
}
|
||||||
load_icons_first(current_list, false);
|
else if(((kDown | kHeld)) & KEY_DDOWN)
|
||||||
}
|
{
|
||||||
else if(((kDown | kHeld)) & KEY_L)
|
sort_author:
|
||||||
{
|
sort_by_author(current_list);
|
||||||
sort_name:
|
load_icons_first(current_list, false);
|
||||||
sort_by_name(current_list);
|
}
|
||||||
load_icons_first(current_list, false);
|
|
||||||
}
|
|
||||||
else if(((kDown | kHeld)) & KEY_R)
|
|
||||||
{
|
|
||||||
sort_author:
|
|
||||||
sort_by_author(current_list);
|
|
||||||
load_icons_first(current_list, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user