RE: Requests for mouse supportby (no login)QB64 will support mouse usage via an emulated interrupt (&H33) which will be accessed via CALL INTERRUPT or machine code via CALL ABSOLUTE. That said, QB64 programmers will have better ways to access mouse input. The mouse input prototype will begin with just a few critical subs/functions, but this will later be built on with new subs/functions to provide better control. The critical features of the first QB64 MOUSE PROTOTYPE are: i) Ability to show/hide the mouse cursor. ii) Ability to monitor all changes to mouse location and button presses. A serious trap most BASIC programmers fall into is just reading the values of the current mouse state with total disregard for the previous states which may have been missed since the previous read from the mouse was performed. A common result is a QBASIC program misses quick button presses. Therefore it is essential that QB64 provides a way to sequentially return information about every state change that has happened to the mouse. The following example (although not a useful program in itself) demonstrates ALL of the functionality the first mouse prototype will provide: _MOUSESHOW DO IF _MOUSEINFO THEN PRINT _MOUSEX PRINT _MOUSEY PRINT _MOUSEBUTTON(i) END IF LOOP UNTIL INKEY$<>"" _MOUSEHIDE Note the _MOUSEINFO function which returns non-zero if a more recent mouse state is/(or has become) available. If it is available, after calling _MOUSEINFO the mouse functions then return information about the more recent state. This prototype will be available for use in the next demo (demo #8), Galleon PS. This is still a work in progress. Feel free to comment. from IP address 58.106.166.35 |
| Response Title | Author and Date |
| Feeling free to comment here ;-)....hehe | on Apr 28 |
| You are referring to AX = 5 for press and AX = 6 for release | on Apr 28 |
| Ah, the old: "Bitch and you shall receive" theory works again! | Pete on Apr 28 |
| Some useful stuff on interrupts | qbguy on Apr 28 |