When I use vid(3) to change the video resolution, it seems to mess with the mouse() reading.
The code below replicates the error for me (v0.1.0e, Mac version):
function _init() vid(3) end function _update() mx,my,mb=mouse() end function _draw() cls() print( mx .. ":" .. my .. ":" .. mb, 5, 5, 7 ) end |
For me, when I run the above code, there are large portions of the screen which do not register "mb" as "1" when I click with the mouse. The only portions of the screen that properly register the mouse button as "1" is a rectangle in the upper-left corner, from (mx=0,my=0) to about (mx=119,my=67).
Weirdly, if you click inside that rectangle, the mouse button registers as a "1" and continues to register as a "1" as long as you hold it down even outside that rectangle, so it only seems to affect the initial mouse-down event.
If I comment out the "vid(3)" line, the mouse works as expected over the entire window, so it appears to be specific to the "vid(3)" video mode.
If I change it to "vid(4)" the rectangle contracts again to about (0,0,53,26), so it seems to be related to the "zoom level" of Picotron's resolution.
[Please log in to post a comment]