Read mouse position on canvas

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Read mouse position on canvas

#1 Post by Keith Baxter »

@Corjan

Want to be able to read mouse/cursor position on canvas.
Also to be able to grab canvas and drag, and zoom.
Then also to be able to grab and drag a node.

Yes I have seen this all before somewhere ....:mrgreen:

Pleas find some time for this.

Something like

cursor_position = GetCursorPosition()
mouse_position = GetMouse()
move("mouse_position",x,y,width,height)

grab_node = grab_node(x,y)
move("grab_node",x,y,width,height)

The reason is to be able to grab nodes (way-points) with a mouse and drag them to different positions on the canvas. The mouse read is to be able to display the position the mouse is in and to to reposition the new way-point.
Also if I can read the mouse position on the canvas then i can pop up the country, city, airport, waypoint etc

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply