[client] imgui: implement mouse wheel motion support

The display server should call app_handleWheelMotion as necessary.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-07-31 14:58:35 +10:00
1 parent 6b6b3b724a
commit 7ca5e14938
2 files changed
+7

No files matched your search

+1
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);
+6
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)