| 680 | void RecruitScreen::finish() {} |
| 681 | |
| 682 | void RecruitScreen::eventOccurred(Event *e) |
| 683 | { |
| 684 | form->eventOccured(e); |
| 685 | |
| 686 | if (e->type() == EVENT_MOUSE_MOVE) |
| 687 | { |
| 688 | arrow->setVisible(!(e->mouse().X > arrow->getLocationOnScreen().x)); |
| 689 | } |
| 690 | |
| 691 | if (e->type() == EVENT_KEY_DOWN) |
| 692 | { |
| 693 | if (e->keyboard().KeyCode == SDLK_ESCAPE || e->keyboard().KeyCode == SDLK_RETURN || |
| 694 | e->keyboard().KeyCode == SDLK_SPACE || e->keyboard().KeyCode == SDLK_KP_ENTER) |
| 695 | { |
| 696 | form->findControl("BUTTON_OK")->click(); |
| 697 | return; |
| 698 | } |
| 699 | } |
| 700 | |
| 701 | if (e->type() == EVENT_FORM_INTERACTION) |
| 702 | { |
| 703 | if (e->forms().EventFlag == FormEventType::ButtonClick) |
| 704 | { |
| 705 | if (e->forms().RaisedBy->Name == "BUTTON_OK") |
| 706 | { |
| 707 | attemptCloseScreen(); |
| 708 | return; |
| 709 | } |
| 710 | } |
| 711 | } |
| 712 | } |
| 713 | |
| 714 | void RecruitScreen::update() { form->update(); } |
| 715 |
nothing calls this directly
no test coverage detected