Changeset 6053b24 in opengl-game for vulkan-game.cpp
- Timestamp:
- Feb 14, 2021, 6:53:53 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- db1b548
- Parents:
- 8d96e95
- git-author:
- Dmitry Portnoy <dportnoy@…> (02/14/21 18:53:48)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (02/14/21 18:53:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r8d96e95 r6053b24 781 781 lastSpawn_asteroid = curTime; 782 782 783 ImGuiIO& io = ImGui::GetIO(); 784 783 785 done = false; 784 786 while (!done) { … … 802 804 while (gui->pollEvent(&uiEvent)) { 803 805 GameEvent& e = uiEvent.event; 806 SDL_Event sdlEvent = uiEvent.rawEvent.sdl; 807 808 ImGui_ImplSDL2_ProcessEvent(&sdlEvent); 809 if (io.WantCaptureMouse && 810 (e.type == UI_EVENT_MOUSEBUTTONDOWN || e.type == UI_EVENT_MOUSEBUTTONUP || e.type == UI_EVENT_UNKNOWN)) { 811 if (sdlEvent.type == SDL_MOUSEWHEEL || sdlEvent.type == SDL_MOUSEBUTTONDOWN || sdlEvent.type == SDL_MOUSEBUTTONUP) { 812 continue; 813 } 814 } 815 if (io.WantCaptureKeyboard && 816 (e.type == UI_EVENT_KEYDOWN || e.type == UI_EVENT_KEYUP)) { 817 if (sdlEvent.type == SDL_KEYDOWN || sdlEvent.type == SDL_KEYUP) { 818 continue; 819 } 820 } 821 if (io.WantTextInput) { 822 // show onscreen keyboard if on mobile 823 } 804 824 805 825 switch(e.type) {
Note:
See TracChangeset
for help on using the changeset viewer.