| 599 | } |
| 600 | |
| 601 | void zUI_Update(_zUI* ent, xScene*, F32 dt) |
| 602 | { |
| 603 | if (xEntIsVisible(ent) && ent->model && (!(ent->uiFlags & 0x4) || !ent->sasset->textureID)) |
| 604 | { |
| 605 | xModelUpdate(ent->model, dt); |
| 606 | xModelEval(ent->model); |
| 607 | } |
| 608 | |
| 609 | if (ent->uiButton && gTrcPad[0].state == TRC_PadInserted) |
| 610 | { |
| 611 | if (ent->uiButton & XPAD_BUTTON_UP) |
| 612 | { |
| 613 | zEntEvent(ent, ent, eEventPadPressUp); |
| 614 | } |
| 615 | else if (ent->uiButton & XPAD_BUTTON_DOWN) |
| 616 | { |
| 617 | zEntEvent(ent, ent, eEventPadPressDown); |
| 618 | } |
| 619 | else if (ent->uiButton & XPAD_BUTTON_LEFT) |
| 620 | { |
| 621 | zEntEvent(ent, ent, eEventPadPressLeft); |
| 622 | } |
| 623 | else if (ent->uiButton & XPAD_BUTTON_RIGHT) |
| 624 | { |
| 625 | zEntEvent(ent, ent, eEventPadPressRight); |
| 626 | } |
| 627 | else if (ent->uiButton & XPAD_BUTTON_START) |
| 628 | { |
| 629 | zEntEvent(ent, ent, eEventPadPressStart); |
| 630 | } |
| 631 | else if (ent->uiButton & XPAD_BUTTON_SELECT) |
| 632 | { |
| 633 | zEntEvent(ent, ent, eEventPadPressSelect); |
| 634 | } |
| 635 | else if (ent->uiButton & XPAD_BUTTON_R1) |
| 636 | { |
| 637 | zEntEvent(ent, ent, eEventPadPressR1); |
| 638 | ent->uiButton = XPAD_BUTTON_R1; |
| 639 | } |
| 640 | else if (ent->uiButton & XPAD_BUTTON_R2) |
| 641 | { |
| 642 | zEntEvent(ent, ent, eEventPadPressR2); |
| 643 | ent->uiButton = XPAD_BUTTON_R2; |
| 644 | } |
| 645 | else if (ent->uiButton & XPAD_BUTTON_L1) |
| 646 | { |
| 647 | zEntEvent(ent, ent, eEventPadPressL1); |
| 648 | } |
| 649 | else if (ent->uiButton & XPAD_BUTTON_L2) |
| 650 | { |
| 651 | zEntEvent(ent, ent, eEventPadPressL2); |
| 652 | } |
| 653 | else if (ent->uiButton & XPAD_BUTTON_X) |
| 654 | { |
| 655 | zEntEvent(ent, ent, eEventPadPressX); |
| 656 | } |
| 657 | else if (ent->uiButton & XPAD_BUTTON_O) |
| 658 | { |
nothing calls this directly
no test coverage detected