Mouse cursor isn't moving when ingame imgui editors are active.
Steps to reproduce:
exec editLights command via console
Result:
Mouse cursor stuck at the top-left corner of the game window and isn't moving.
Expected behaviour:
Mouse is moving normally.
Investigation:
Mouse position in imgui tools is updated by SE_MOUSE_ABSOLUTE but in SDL platform implementation it is generated only when the menu is opened, if that is not the case, then SE_MOUSE with relative mouse position is generated.
Possible fix:
Add additional check ImGuiTools::ReleaseMouseForTools() to the SDL_MOUSEMOTION case
case SDL_MOUSEMOTION:
if( game && ( game->Shell_IsActive() || ImGuiTools::ReleaseMouseForTools() ) )
(more appropriate in my opinion) handle SE_MOUSE events and update g_MousePos with relative coords accordingly.
Environment:
Description of a bug:
Mouse cursor isn't moving when ingame imgui editors are active.
Steps to reproduce:
editLights
command via consoleResult:
Mouse cursor stuck at the top-left corner of the game window and isn't moving.
Expected behaviour:
Mouse is moving normally.
Investigation:
Mouse position in imgui tools is updated by
SE_MOUSE_ABSOLUTE
but in SDL platform implementation it is generated only when the menu is opened, if that is not the case, thenSE_MOUSE
with relative mouse position is generated.Possible fix:
ImGuiTools::ReleaseMouseForTools()
to theSDL_MOUSEMOTION
case(more appropriate in my opinion) handleSE_MOUSE
events and updateg_MousePos
with relative coords accordingly.