| 579 | } |
| 580 | |
| 581 | void ASDebugger::PollEvents() { |
| 582 | Graphics* graphics = Graphics::Instance(); |
| 583 | Input* input = Input::Instance(); |
| 584 | SDL_Event event; |
| 585 | while (SDL_PollEvent(&event)) { |
| 586 | ProcessEventImGui(&event); |
| 587 | // Redirect input events to the controller |
| 588 | switch (event.type) { |
| 589 | case SDL_WINDOWEVENT: |
| 590 | switch (event.window.event) { |
| 591 | case SDL_WINDOWEVENT_FOCUS_LOST: |
| 592 | input->HandleEvent(event); |
| 593 | break; |
| 594 | case SDL_WINDOWEVENT_FOCUS_GAINED: |
| 595 | input->HandleEvent(event); |
| 596 | break; |
| 597 | } |
| 598 | break; |
| 599 | case SDL_QUIT: |
| 600 | input->RequestQuit(); |
| 601 | return; |
| 602 | case SDL_MOUSEBUTTONDOWN: |
| 603 | case SDL_MOUSEWHEEL: |
| 604 | if (!WantMouseImGui()) { |
| 605 | input->HandleEvent(event); |
| 606 | } |
| 607 | break; |
| 608 | case SDL_KEYDOWN: |
| 609 | case SDL_TEXTINPUT: |
| 610 | if (!WantKeyboardImGui()) { |
| 611 | input->HandleEvent(event); |
| 612 | } |
| 613 | break; |
| 614 | default: |
| 615 | input->HandleEvent(event); |
| 616 | } |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | void ASDebugger::VariablesMenu(const char* window_name, ImGuiTextFilter& filter, std::vector<Variable>& variables, bool& show_variables) { |
| 621 | if (show_variables) { |
nothing calls this directly
no test coverage detected