How to use Mouse events

Started by Sardtok, August 11, 2006, 04:40:19

Previous topic - Next topic

Sardtok

Hey,
just wondering how to use mouse events.
When should I call getEventX/getEventDX for instance?
Should I only do that if the getEventButton method returns -1?
Or can I call them if it's a button event as well, to find the mouse position at the time of a mouse press or release?
I figure the getEventDWheel would be the same as for getEventX/DX/Y/DY methods.

I guess that all events that result in getEventButton() == -1 are movement or wheel events.
igg -- Take me off for great justice?

Sardtok

Ok, I decided to do an experiment using the famous println...
Seems, getting coordinates is valid no matter what,
so I guess that's fine.

But I noticed something really weird, I didn't get any events from pressing my thumb-button (should have button id #3), and my mouse is being reported as a 4 button mouse.
I only use this button in FPS games, and that's not what I'm working on, but I'd like to be able to support it, is this a common problem?
I use a Logitech Mouseman Optical dual sensor (have no idea what the exact name is, it's pretty old).
igg -- Take me off for great justice?

Matzon

does the joystick work fine in other games?

Fool Running

Quotedoes the joystick work fine in other games?
I think you mean, "does the mouse work fine in other games?"  :D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

Sardtok

Sorry,
my internet connection went down some hours after my last post,
but I've been chopping up the cable a bit and fixed the problem. ;)

Anyway, yes, my fourth mouse button works fine both in windows and in games, I use it for jumping in FPS games, as I believe I stated. ;)
igg -- Take me off for great justice?