mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Allow dpad to navigate DJUI menus
This commit is contained in:
parent
a34293a58a
commit
be30578bf3
1 changed files with 12 additions and 0 deletions
|
@ -301,6 +301,18 @@ void djui_interactable_update_pad(void) {
|
|||
static f32 padHoldTimer = 0;
|
||||
|
||||
enum PadHoldDirection padHoldDirection = sKeyboardHoldDirection;
|
||||
// allow dpad to navigate
|
||||
if (padHoldDirection == PAD_HOLD_DIR_NONE) {
|
||||
if (pad->button & U_JPAD) {
|
||||
padHoldDirection = PAD_HOLD_DIR_UP;
|
||||
} else if (pad->button & D_JPAD) {
|
||||
padHoldDirection = PAD_HOLD_DIR_DOWN;
|
||||
} else if (pad->button & L_JPAD) {
|
||||
padHoldDirection = PAD_HOLD_DIR_LEFT;
|
||||
} else if (pad->button & R_JPAD) {
|
||||
padHoldDirection = PAD_HOLD_DIR_RIGHT;
|
||||
}
|
||||
}
|
||||
if (padHoldDirection != PAD_HOLD_DIR_NONE) {
|
||||
switch (padHoldDirection) {
|
||||
case PAD_HOLD_DIR_UP: pad->stick_x = 0; pad->stick_y = -64; break;
|
||||
|
|
Loading…
Reference in a new issue