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,7 +98,30 @@ 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 sort",
|
||||
.info_line_color = COLOR_WHITE,
|
||||
.instructions = {
|
||||
{
|
||||
L"\uE079 Sort by name",
|
||||
L"\uE07A Sort by author"
|
||||
},
|
||||
{
|
||||
L"\uE07B Sort by filename",
|
||||
NULL
|
||||
},
|
||||
{
|
||||
NULL,
|
||||
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 = {
|
||||
@@ -108,17 +131,18 @@ Instructions_s extra_instructions = {
|
||||
},
|
||||
{
|
||||
L"\uE07B Browse ThemePlaza",
|
||||
L"\uE07C Sort by filename"
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
L"\uE004 Sort by name",
|
||||
L"\uE005 Sort by author"
|
||||
L"\uE004 Sorting menu",
|
||||
NULL
|
||||
},
|
||||
{
|
||||
L"Exit",
|
||||
NULL
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -347,7 +347,19 @@ int main(void)
|
||||
if(install_mode)
|
||||
instructions = install_instructions;
|
||||
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();
|
||||
else if(preview_mode) draw_preview(TEXTURE_PREVIEW, preview_offset);
|
||||
@@ -526,6 +538,10 @@ int main(void)
|
||||
if(kUp & KEY_X)
|
||||
extra_mode = false;
|
||||
if(!extra_mode)
|
||||
{
|
||||
bool key_l = (kDown | kHeld) & KEY_L;
|
||||
bool key_r = (kDown | kHeld) & KEY_R;
|
||||
if(!(key_l ^ key_r))
|
||||
{
|
||||
if((kDown | kHeld) & KEY_DLEFT)
|
||||
{
|
||||
@@ -542,29 +558,33 @@ int main(void)
|
||||
jump_menu(current_list);
|
||||
|
||||
}
|
||||
else if((kDown | kHeld) & KEY_DRIGHT)
|
||||
else if((kDown | kHeld) & KEY_DDOWN)
|
||||
{
|
||||
load_icons_first(current_list, false);
|
||||
}
|
||||
}
|
||||
else if(key_l)
|
||||
{
|
||||
if((kDown | kHeld) & KEY_DLEFT)
|
||||
{
|
||||
sort_path:
|
||||
sort_by_filename(current_list);
|
||||
load_icons_first(current_list, false);
|
||||
}
|
||||
else if((kDown | kHeld) & KEY_DDOWN)
|
||||
{
|
||||
load_icons_first(current_list, false);
|
||||
}
|
||||
else if(((kDown | kHeld)) & KEY_L)
|
||||
else if(((kDown | kHeld)) & KEY_DUP)
|
||||
{
|
||||
sort_name:
|
||||
sort_by_name(current_list);
|
||||
load_icons_first(current_list, false);
|
||||
}
|
||||
else if(((kDown | kHeld)) & KEY_R)
|
||||
else if(((kDown | kHeld)) & KEY_DDOWN)
|
||||
{
|
||||
sort_author:
|
||||
sort_by_author(current_list);
|
||||
load_icons_first(current_list, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user