-
|
How to convert mouse coordinates on the мpanel to tile coordinates? I'm intercepting mouse movement events and want to highlight the tiles the mouse is moving over. |
Beta Was this translation helpful? Give feedback.
Answered by
Valkryst
Dec 16, 2025
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
akurutin
-
|
Thank you very much for such a detailed answer and for your library ;) I'm making a small game for my wife for the New Year, and vterminal is really helping me with it ;) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

You should be able to use the
getWidthInTiles()andgetHeightInTiles()methods to convert mouse coordinates to tile coordinates using a calculation similar to the following:Demo
Preview
Code
…