I need to get cursor coordinates for specific web-visu client in variables.
I have client context (POINTER TO VisuElems.VisuStructClientData), can I extract cursor info from this struct?
check out the example on the store https://store.codesys.com/visu-event-handler.html, especially the MouseHandler.project
In this example cursor "global" for all web-clients.
In my case I have independent clients with independent cursors.
Can you give a tip how I need to edit example in my case?
HandleMouseMoveEvent will be called with the client where the move occurred.
IF you use CURRENTCLIENTID in your visualization, you can use pClient^.GlobalData.GlobalClientID to store the values in a array (otherwise GlobalClientID will always be -1).
For the size of the array you can use VISU_MIN_NUMBER_OF_CLIENTS & VISU_MAX_NUMBER_OF_CLIENTS
ARRAY [VISU_MIN_NUMBER_OF_CLIENTS..VISU_MAX_NUMBER_OF_CLIENTS] OF VisuStructPoint;
Log in to post a comment.