the exact way to reproduce this annoying bug is to
click on a npc to start dialog
click the node that ends the dialog
and when asked to click anywhere to continue, click twice without moving the
mouse (and with the npc still at the same place)
like the input_mouse_button is not executed, only the input_mouse_motion can
update the input_axis.x and input_axis.y which are used to know what's under the
cursor in mouse_cursor_is_on_that_image via GetLivingDroidBelowMouseCursor so if
you don't move the mouse, the mouse position before entering the dialog will be
the input_mouse_button is not executed because MouseLeftPressed, like others
similar functions, are pumping the event loop via SDL_PumpEvents. When they do
that, they become aware of a click that the function input_handle isn't.
Except that the call of SDL_PumpEvents is useless because SDL_PollEvent
implicitly call SDL_PumpEvents in input_handle every game loop iteration. This
is problematic to refresh the input after input_handle because the data set in
input_handle will then become false (like the mouse position in this case).
There're calls to KeyPressed's function which requires the call of SDL_PumpEvents.
they follow this pattern : while (!KeyPressed()) ;
or this one which I think is much better : while (!KeyPressed()) \n SDL_Delay(1);