Mouse Input
Blitz3D Forums/Blitz3D Beginners Area/Mouse Input
| ||
As you may have seen in the General Help section, I got a new mouse with 2 extra buttons on it. I was wondering if I could in any way (dll/userlib or whatever) read them. |
| ||
Probably there is a ready to use solution floating around somewhere, did you already check the code archives, especially section userlibs? I guess you need however to install a special mouse driver for mouses with more than 3 Buttons. EDIT There is a B+ sample in the archives (didn't see one for B3D yet), showing how to use mouse_event and SetCursorPos. I'm not sure if these are the ones that will do the trick. Just don't use the other stuff that is B+ specific in this souce: http://www.blitzbasic.com/codearcs/codearcs.php?code=1186 . Get a good info source for your API works, like the original API Help files, also seen on this page: http://www.carabez.com/downloads.html ( win32api.zip,win32api_big.zip,constants.zip) If you once understand how to declare an API function in a decls file for Blitz then you may use any windows API function in Blitz with relative ease. /EDIT EDIT2: Uhm, I just see mouse_event seems to be a function to automatize some mouse events, like simulating a mouseclick, and not as I I thought a function to gather mouse information. But there is a function named GetNumberOfConsoleMouseButtons that may be interesting. When you let google search for it, it may find some sources that are handling higher numbers of buttons. |
| ||
Thanks, I'll check those out. |
| ||
Someone already provided you with the info: http://www.blitzbasic.com/Community/posts.php?topic=85172#963086 http://www.blitzbasic.com/codearcs/codearcs.php?code=1943 |
| ||
That doesn't read mouse buttons does it? If so, could you explain the API stuff a little bit? |
| ||
That doesn't read mouse buttons does it? If so, could you explain the API stuff a little bit? Do you not remember commenting on those archive entries about 4 months ago? EDIT: Hold on, I think I know what you mean... :P |
| ||
If it helps, the buttons act as forward/back buttons in Windows Explorer, and Internet Browsers |
| ||
wrote a little dll for this... http://www.blitzbasic.com/toolbox/toolbox.php?tool=242 |
| ||
Thanks. I'll try those out when I add that function to my level builder (soon?). |
| ||
Thanks, got 4-5 buttons to work/detected! Any way to check combination of buttons like "3rd and 5th button pressed"? |
| ||
I would guess you could possibly write it the same way for the other buttons for example: If MouseDown(1)=True Then ;do whatever |