Dilwyn Jones wrote:
> This seems to work with any size of window, haven't tried many sizes though.
> Should work with an Easyptr menu too, though not tried that yet. Only run it
> in BASIC job 0 - intend to try it as an SBASIC job and compiled at some
> point. Only tried it in QPC2 3.34beta3 high colour 1440x900 - would be handy
> if it could be tried on other systems to see how it works (or not).

This mechanism only works on my "recent" pointer environments where
background I/O is enabled. It might always work with a 0x0-sized
window, I guess. Another method to globally get the current mouse
position is what I've described yesterday:

con_linkage = PEEK_L(!;$C4)
mouse_x = PEEK_W(con_linkage + $3c)
mouse_y = PEEK_W(con_linkage + $3c)

> Lines 160 to 170 summon the pointer (would be interesting to see if using a
> small transparent or 0x0 pointer can be used, just so that the pointer is
> not visible in this program's window.

Of course.

> Line 200 does the doings, checking if the pointer is at the bottom pixel of
> the screen. Pr%(15) is the absolute pointer y co-ordinate, while SCR_YLIM-1
> is the lowest pixel on the screen. Since it is hard to position the pointer
> exactly on the bottom line it might be better to do something like IF 
> pr%(15) > (SCR_YLIM-4) to allow it to have a small zone instead of a one
> pixel line.

Actually until (I think) SMSQ/E 3.10 it was completely *impossible* to
position the pointer exactly at the bottom of the screen. I could only
allow this once I had implemented vertical sprite clipping.

> One thing I noticed is that with some screen edges the pointer can't
> actually get to the last pixel, probably just depends on the pointer size
> and origin. For example, the right of the screen. In that case you'd have to
> check if it's within that number of pixels of the edge.

Yes, I didn't do horizontal sprite clipping for some reason. Was
probably too difficult to retro-fit.

Marcel

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to