[client] imgui: implement mouse wheel motion support

The display server should call app_handleWheelMotion as necessary.
This commit is contained in:
Quantum 2021-07-30 07:01:37 -04:00 committed by Geoffrey McRae
parent 6b6b3b724a
commit 7ca5e14938
2 changed files with 7 additions and 0 deletions

View File

@ -56,6 +56,7 @@ void app_resyncMouseBasic(void);
void app_handleButtonPress(int button);
void app_handleButtonRelease(int button);
void app_handleWheelMotion(double motion);
void app_handleKeyPress(int scancode);
void app_handleKeyRelease(int scancode);
void app_handleEnterEvent(bool entered);

View File

@ -270,6 +270,12 @@ void app_handleButtonRelease(int button)
DEBUG_ERROR("app_handleButtonRelease: failed to send message");
}
void app_handleWheelMotion(double motion)
{
if (g_state.overlayInput)
g_state.io->MouseWheel -= motion;
}
void app_handleKeyPress(int sc)
{
if (sc == g_params.escapeKey && !g_state.escapeActive)