Create account / Log in

Mouse coordinates

Topics related to the main Vassal engine.

Moderators: uckelman, Tim M

Mouse coordinates

Postby barbanera » July 27th, 2020, 5:00 pm

Is there any way to find out what the X,Y coordinates of the mouse are when triggering a command on a piece? I mean the coordinates on the given map or even just offsets relative to the given piece.

What I am trying/hoping to do is having a large piece (actually covering the whole map, transparent or otherwise), right clicking on it somewhere to pull up a menu with a command like "place ship here" and actually have it "place marker" a ship at the precise X,Y coordinates where the mouse was.

Unfortunately, CurrentX/CurrentY always refer to the center of the piece... but maybe I am missing something obvious here.

Otherwise - feature request - it would be nice to have MouseX/MouseY (or something such) as global properties in the next update!
Posts: 384
Joined: January 12th, 2012, 2:27 pm

Re: Mouse coordinates

Postby Cattlesquat » August 3rd, 2020, 7:21 pm

It looks like VASSAL 3.3.3 will have this, so be on the lookout for betas and you can help us try it out and make sure it works well.

You'll simply define Dynamic Properties for ClickedX and ClickedY in the piece you want to know where the right-click was, and it will be automatically filled in.
User avatar
Posts: 783
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests