Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mousequery map boundary detection fixes #1440

Merged
merged 2 commits into from May 18, 2019

Conversation

lethosor
Copy link
Member

This changes mousequery to use the map dimensions returned from Gui::getDwarfmodeViewDims() to determine map boundaries rather than some complicated (and inconsistent) math with other fields. Granted, mousequery predates the map_x2/y2 fields. However, TWBT breaks the old checks because it modifies the result of getMousePos() to support different map tile sizes. In the case where the map tiles are larger than the surrounding tiles, mousequery would think that the mouse wasn't close to the bottom/right edges of the map when it actually was.

This hopefully fixes some edge detection issues reported on the forums, as well as potential similar issues with other features (tracking and right-button scrolling).

TWBT modifies the map dimensions, so using the window dimensions to handle edge
scrolling produces the wrong behavior when using a larger map tileset than text
tileset.
@lethosor lethosor added this to In progress in 0.44.12-r3 via automation May 17, 2019
@lethosor
Copy link
Member Author

Pvt Pirate reports that this works on the forums, and I can't see any difference from the original behavior without TWBT, so I'm merging it.

@lethosor lethosor merged commit 92717a7 into DFHack:develop May 18, 2019
0.44.12-r3 automation moved this from In progress to Done May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
0.44.12-r3
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant