[Vm-dev] Primtive 91/primCursorLocPut:

Tom Beckmann tomjonabc at gmail.com
Mon Dec 23 06:34:28 UTC 2019


Hey everyone,

I was looking for a way to set the OS cursor position from Squeak and found
primitive 91 (see screenshots), which used to do exactly that (also
according to the blue book). Now it instead returns whether a pixel depth
is supported by the display.

Has an alternative for setting the cursor position been implemented? If
not, what would be the correct way of re-adding that functionality? Taking
over another primitive number? I read that some people resorted to using
custom FFI, but I feel like it could be worth the effort to properly
reintegrate the functionality.

Usecases: for example in Photoshop you often have number inputs on the far
right side of your monitor. These support clicking and dragging for
changing the value. However, the cursor will almost immediately hit the
right edge of the screen. To prevent this, the cursor position will keep
being reset to the center of the slider element while the user is dragging.
Further, games often use mouse input as a relative number, rather than
absolute, by forcing the cursor to the center of screen after each frame
and only taking the movement between each frame. This is most commonly seen
in games with first person perspective.

Thank you for any pointers!

Best,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191223/3ef9238f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2019-12-07 11-16-13.png
Type: image/png
Size: 23770 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191223/3ef9238f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2019-12-07 11-19-50.png
Type: image/png
Size: 90922 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20191223/3ef9238f/attachment-0003.png>


More information about the Vm-dev mailing list