Examples: Comments about invalid mouse pos.

This commit is contained in:
omar
2017-12-29 15:03:36 +01:00
parent 4fbdb50dca
commit 9f8632b131
6 changed files with 6 additions and 6 deletions

View File

@ -387,7 +387,7 @@ void ImGui_ImplSdlGL3_NewFrame(SDL_Window* window)
int mx, my;
Uint32 mouseMask = SDL_GetMouseState(&mx, &my);
if (SDL_GetWindowFlags(window) & SDL_WINDOW_MOUSE_FOCUS)
io.MousePos = ImVec2((float)mx, (float)my); // Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.)
io.MousePos = ImVec2((float)mx, (float)my);
else
io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);