Frictional Games Forum (read-only)
[Suggestion] Support for extra mouse buttons - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Amnesia: A Machine for Pigs (https://www.frictionalgames.com/forum/forum-52.html)
+--- Thread: [Suggestion] Support for extra mouse buttons (/thread-23072.html)



[Suggestion] Support for extra mouse buttons - UCyborg - 09-12-2013

Couldn't decide where to post this since it's a suggestion for an engine feature which would benefit both Amnesia games on all platfroms but anyway, could you guys add support for more mouse buttons? (SDL_BUTTON_X1, SDL_BUTTON_X2, ...)

At least on Windows, for typical 5-button mouse, it's as simple as checking for either SDL_BUTTON_X1 or SDL_BUTTON_X2 when responding to SDL_MOUSEBUTTONDOWN and SDL_MOUSEBUTTONUP events. A bit different for Linux though since those exact same buttons generate a different number for button member of SDL_MouseButtonEvent struct.