MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / PollEvents

Method PollEvents

Source/Scripting/angelscript/asdebugger.cpp:581–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579}
580
581void 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
620void ASDebugger::VariablesMenu(const char* window_name, ImGuiTextFilter& filter, std::vector<Variable>& variables, bool& show_variables) {
621 if (show_variables) {

Callers

nothing calls this directly

Calls 5

ProcessEventImGuiFunction · 0.85
WantMouseImGuiFunction · 0.85
WantKeyboardImGuiFunction · 0.85
RequestQuitMethod · 0.80
HandleEventMethod · 0.45

Tested by

no test coverage detected