supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Display world screenshot previews and progress

Open Vankata453 opened this issue 2 years ago • 16 comments

WorldSetMenu and SortedContribMenu now inherit the new WorldPreviewMenu class, which allows displaying profile-specific world previews and progress. A preview for a world is generated each time the user leaves its worldmap. Only worldmap levelsets support this feature. Supported also are optional placeholder world previews, which have to be named preview.png, and stored in the relative to levels directory for the world.

image

FileSystemMenu also now shows previews of images, when hovering over an image file.

image

fixes #2286

Vankata453 avatar Dec 04 '22 19:12 Vankata453

/home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:139:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:172:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:200:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:256:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:347:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:361:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:382:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD; ^ /home/runner/work/supertux/supertux/src/worldmap/worldmap_state.cpp:410:30: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt] WORLDMAP_STATE_SECTOR_GUARD;

tobbi avatar Oct 27 '23 18:10 tobbi

This PR is now ready for review.

Vankata453 avatar Jul 14 '24 11:07 Vankata453

Is completing all levels normally supposed to count as 100%? What about getting all collectibles?

That is only supposed to indicate the progress through levels on the map. If the percentage isn't perceived well, I can remove it.

On small screens, the help text is not fully readable because it's not aligned to the screen but rather to the menu.

True, it should stay centered regardless.

I don't see any animations when navigating a Filesystem menu.

Do you have transitions enabled?

Vankata453 avatar Jul 14 '24 13:07 Vankata453

Do you have transitions enabled?

Yes, but now that I think about it, this might be because the loading time overrides the animation. That can be something for another pr. Will do some further investigation later.

The preview still gets squished. I cloned this PR and am currently trying to write a fix for this

MatusGuy avatar Jul 15 '24 17:07 MatusGuy

this might be because the loading time overrides the animation

Yes, if you go to the next item too quickly, there will be no time for animations.

The preview still gets squished.

It does, but only if you change your resolution to be different from the one when the screenshot was taken.

Vankata453 avatar Jul 15 '24 17:07 Vankata453