This has been driving me nuts, and google has not resulted in any success. I am using ClanLib for my graphics and input, and I'm having trouble specifically getting access to the mouse wheel. What I want, is when the mouse wheel is scrolled up, that it scrolls my chat buffer up, and vice versa when going down. I already confirmed those specific actions work, and that the problem relies entirely in how I check if the mouse wheel moved.
if(CL_Mouse::get_keycode(CL_MOUSE_WHEEL_UP))
{
CHAT_BUFFER_OFFSET -= 1;
}
If it helps, the keys.h that is part of clanlib has a few mouse specific defines
#define CL_MOUSE_LEFT 0
#define CL_MOUSE_RIGHT 1
#define CL_MOUSE_MIDDLE 2
#define CL_MOUSE_WHEEL_UP 3
#define CL_MOUSE_WHEEL_DOWN 4
#define CL_MOUSE_XBUTTON1 5
#define CL_MOUSE_XBUTTON2 6
When I replace the keycode check with any other mouse keycode, they all work except for CL_MOUSE_WHEEL_UP and CL_MOUSE_WHEEL_DOWN. So I must be doing something wrong, and I have been unable to google anything up. Anyone that knows what I'm doing wrong?
[Edited by - Necrosis on April 1, 2006 6:31:36 PM]