I was wondering is there a function in electro that I can use to
retrieve the position of the mouse on the electro screen. I tried
using do_point() but that only returns the coordinates when the mouse
moves. Thanks.
Daryl
This callback is invoked whenever the mouse pointer moves within the Electro main window. Motion is reported relatively, so the pointer may move an unlimited distance in any direction. Absolute position is not reported. If absolute mouse position is necessary, then it must be tracked manually, as follows:
mouse_x = 0
mouse_y = 0
function do_point(dx, dy)
mouse_x = mouse_x + dx
mouse_y = mouse_y + dy
return true
end
I want it to be something like the get_entity_position() function
call, where it returns the x,y,z coordinates of where the mouse is. I
tried using the function you mention above, but it only would return
the distances moved.
Daryl
As John points out, this question is answered in the documentation.
Please read and understand it.
More importantly, understand why Electro does this: the window that
Electro displays is more than just an application window, it is a
front-end interface to a clustered display of potentially unlimited
size. Electro allows you to have a mouse pointer that functions
effectively across a huge display, like the 17600x6000 one at EVL. If
the server mouse pointer is limited to the little window, then this is
impossible. Relative mouse events make it possible.
--
Bob
David Thulson