diff options
Diffstat (limited to 'src/union_room_chat.c')
-rwxr-xr-x | src/union_room_chat.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/union_room_chat.c b/src/union_room_chat.c index fd2a95791..75464529f 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1017,12 +1017,12 @@ static void Chat_HandleInput(void) switch (sChat->funcState) { case 0: - if (gMain.newKeys & START_BUTTON) + if (JOY_NEW(START_BUTTON)) { if (sChat->bufferCursorPos) SetChatFunction(CHAT_FUNC_SEND); } - else if (gMain.newKeys & SELECT_BUTTON) + else if (JOY_NEW(SELECT_BUTTON)) { SetChatFunction(CHAT_FUNC_SWITCH); } @@ -1039,14 +1039,14 @@ static void Chat_HandleInput(void) SetChatFunction(CHAT_FUNC_ASK_QUIT); } } - else if (gMain.newKeys & A_BUTTON) + else if (JOY_NEW(A_BUTTON)) { AppendTextToMessage(); StartDisplaySubtask(CHATDISPLAY_FUNC_UPDATE_MSG, 0); StartDisplaySubtask(CHATDISPLAY_FUNC_CURSOR_BLINK, 1); sChat->funcState = 1; } - else if (gMain.newKeys & R_BUTTON) + else if (JOY_NEW(R_BUTTON)) { if (sChat->currentPage != UNION_ROOM_KB_PAGE_REGISTER) { @@ -1100,7 +1100,7 @@ static void Chat_Switch(void) shouldSwitchPages = FALSE; break; case MENU_NOTHING_CHOSEN: - if (gMain.newKeys & SELECT_BUTTON) + if (JOY_NEW(SELECT_BUTTON)) { PlaySE(SE_SELECT); Menu_MoveCursor(1); @@ -1420,13 +1420,13 @@ static void Chat_Register(void) } break; case 1: - if (gMain.newKeys & A_BUTTON) + if (JOY_NEW(A_BUTTON)) { RegisterTextAtRow(); StartDisplaySubtask(CHATDISPLAY_FUNC_RETURN_TO_KB, 0); sChat->funcState = 3; } - else if (gMain.newKeys & B_BUTTON) + else if (JOY_NEW(B_BUTTON)) { StartDisplaySubtask(CHATDISPLAY_FUNC_CANCEL_REGISTER, 0); sChat->funcState = 4; @@ -1457,7 +1457,7 @@ static void Chat_Register(void) sChat->funcState = 6; break; case 6: - if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + if (JOY_NEW(A_BUTTON | B_BUTTON)) { StartDisplaySubtask(CHATDISPLAY_FUNC_DESTROY_YESNO, 0); sChat->funcState = 4; @@ -1591,7 +1591,7 @@ static bool32 HandleDPadInput(void) { do { - if (gMain.newAndRepeatedKeys & DPAD_UP) + if (JOY_REPEAT(DPAD_UP)) { if (sChat->currentRow > 0) sChat->currentRow--; @@ -1599,7 +1599,7 @@ static bool32 HandleDPadInput(void) sChat->currentRow = sKeyboardPageMaxRow[sChat->currentPage]; break; } - if (gMain.newAndRepeatedKeys & DPAD_DOWN) + if (JOY_REPEAT(DPAD_DOWN)) { if (sChat->currentRow < sKeyboardPageMaxRow[sChat->currentPage]) sChat->currentRow++; @@ -1609,7 +1609,7 @@ static bool32 HandleDPadInput(void) } if (sChat->currentPage != UNION_ROOM_KB_PAGE_REGISTER) { - if (gMain.newAndRepeatedKeys & DPAD_LEFT) + if (JOY_REPEAT(DPAD_LEFT)) { if (sChat->currentCol > 0) sChat->currentCol--; @@ -1617,7 +1617,7 @@ static bool32 HandleDPadInput(void) sChat->currentCol = 4; break; } - else if (gMain.newAndRepeatedKeys & DPAD_RIGHT) + else if (JOY_REPEAT(DPAD_RIGHT)) { if (sChat->currentCol < 4) sChat->currentCol++; |