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

Reliable world map scrolling when zoomed in #1583

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

roxya
Copy link
Collaborator

@roxya roxya commented Feb 1, 2023

Scrolling the world map is very unreliable when zoomed in. This is because the scroll distance is calculated each frame, only considering the mouse movement since the last update. The scroll distance is often small enough that it gets truncated to zero.

worldmapscroll

In this PR I'm calculating the scroll based on how far we are from the original click, so it'll always catch up.

Still, the scrolling is a little jerky since we're using integer based rectangles for the texture drawing. Perhaps this could be improved later.

@andreakarasho andreakarasho merged commit 04485c6 into ClassicUO:main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants