Switch to button macros
This commit is contained in:
@@ -335,11 +335,11 @@ u32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str
|
||||
break;
|
||||
case 1:
|
||||
sMysteryGiftLinkMenu.currItemId = ListMenu_ProcessInput(sMysteryGiftLinkMenu.listTaskId);
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
sMysteryGiftLinkMenu.state = 2;
|
||||
}
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
sMysteryGiftLinkMenu.currItemId = LIST_CANCEL;
|
||||
sMysteryGiftLinkMenu.state = 2;
|
||||
@@ -410,20 +410,20 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
|
||||
{
|
||||
struct ListMenu *list = (void*) gTasks[listTaskId].data;
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
return list->template.items[list->scrollOffset + list->selectedRow].id;
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
return LIST_CANCEL;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_UP)
|
||||
else if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
ListMenuChangeSelection(list, TRUE, 1, FALSE);
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
}
|
||||
else if (gMain.newAndRepeatedKeys & DPAD_DOWN)
|
||||
else if (JOY_REPEAT(DPAD_DOWN))
|
||||
{
|
||||
ListMenuChangeSelection(list, TRUE, 1, TRUE);
|
||||
return LIST_NOTHING_CHOSEN;
|
||||
@@ -439,12 +439,12 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
|
||||
rightButton = FALSE;
|
||||
break;
|
||||
case LIST_MULTIPLE_SCROLL_DPAD:
|
||||
leftButton = gMain.newAndRepeatedKeys & DPAD_LEFT;
|
||||
rightButton = gMain.newAndRepeatedKeys & DPAD_RIGHT;
|
||||
leftButton = JOY_REPEAT(DPAD_LEFT);
|
||||
rightButton = JOY_REPEAT(DPAD_RIGHT);
|
||||
break;
|
||||
case LIST_MULTIPLE_SCROLL_L_R:
|
||||
leftButton = gMain.newAndRepeatedKeys & L_BUTTON;
|
||||
rightButton = gMain.newAndRepeatedKeys & R_BUTTON;
|
||||
leftButton = JOY_REPEAT(L_BUTTON);
|
||||
rightButton = JOY_REPEAT(R_BUTTON);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user