mirror of
https://github.com/modmii/YAWM-ModMii-Edition.git
synced 2024-11-22 08:09:18 +01:00
make menu pagination much nicer
This commit is contained in:
parent
60c42a760c
commit
7b47e2800e
@ -1074,11 +1074,16 @@ getList:
|
|||||||
}
|
}
|
||||||
else if (buttons & WPAD_BUTTON_RIGHT)
|
else if (buttons & WPAD_BUTTON_RIGHT)
|
||||||
{
|
{
|
||||||
|
if (fileCnt - start > ENTRIES_PER_PAGE) {
|
||||||
|
start += ENTRIES_PER_PAGE;
|
||||||
selected += ENTRIES_PER_PAGE;
|
selected += ENTRIES_PER_PAGE;
|
||||||
|
|
||||||
if (selected >= fileCnt)
|
if (selected >= fileCnt)
|
||||||
selected = fileCnt - 1;
|
selected = fileCnt - 1;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
selected = fileCnt - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (buttons & WPAD_BUTTON_DOWN)
|
else if (buttons & WPAD_BUTTON_DOWN)
|
||||||
{
|
{
|
||||||
if (++selected >= fileCnt)
|
if (++selected >= fileCnt)
|
||||||
@ -1086,11 +1091,16 @@ getList:
|
|||||||
}
|
}
|
||||||
else if (buttons & WPAD_BUTTON_LEFT)
|
else if (buttons & WPAD_BUTTON_LEFT)
|
||||||
{
|
{
|
||||||
|
if (start >= ENTRIES_PER_PAGE) {
|
||||||
|
start -= ENTRIES_PER_PAGE;
|
||||||
selected -= ENTRIES_PER_PAGE;
|
selected -= ENTRIES_PER_PAGE;
|
||||||
|
|
||||||
if (selected < 0)
|
if (selected < 0)
|
||||||
selected = 0;
|
selected = 0;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
selected = start = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (buttons & WPAD_BUTTON_HOME)
|
else if (buttons & WPAD_BUTTON_HOME)
|
||||||
{
|
{
|
||||||
Restart();
|
Restart();
|
||||||
|
Loading…
Reference in New Issue
Block a user