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

Resize map with drag gesture #12858

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Resize map with drag gesture #12858

merged 5 commits into from
Jan 29, 2025

Conversation

sulai
Copy link
Contributor

@sulai sulai commented Jan 24, 2025

The whole minimap is a drag area which resizes the mini-map. Very useful on android to have a glimpse on the map, then move it back to where it was.

Bildschirmaufzeichnung.vom.2025-01-24.15-11-29.webm

Added an icon to indicate a resize handle to visualize that this is now possible. And another button which toggles full screen. Full screen collapses as soon as the player chooses a location to show. If map size is really small, no map buttons are shown to keep vision free and the whole area counts as click area to toggle the maximized map.

grafik

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@yairm210
Copy link
Owner

Interesting 😎

Copy link

Conflicts have been resolved.

@sulai sulai marked this pull request as ready for review January 27, 2025 20:46
@sulai
Copy link
Contributor Author

sulai commented Jan 27, 2025

The PR is feature complete and ready for review 😄

docs/Credits.md Outdated Show resolved Hide resolved
minimap.touchable = Touchable.disabled
[email protected] {
touchable = Touchable.enabled
onClick(toggle)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... If we call getMaximizeToggleButton twice, then two toggle actions would have been added to the minimap holder
Does this mean they'll both activate and cancel out?

Copy link
Contributor Author

@sulai sulai Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because getMaimizeToggleButton is not called twice. I think you might refer to the two onActivation calls: they also won't trigger at the same time, because in case the whole map acts as click area, the button is invisible. But I'll restructure that part a bit to make it less confusing 👍

@yairm210 yairm210 merged commit f865cf6 into yairm210:master Jan 29, 2025
4 checks passed
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.

3 participants