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

Display world screenshot previews and progress #2349

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

Vankata453
Copy link
Member

@Vankata453 Vankata453 commented Dec 4, 2022

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

@mrkubax10 mrkubax10 added type:feature category:code status:needs-review Work needs to be reviewed by other people labels Dec 6, 2022
@Vankata453 Vankata453 marked this pull request as draft June 24, 2023 14:47
@Vankata453 Vankata453 marked this pull request as ready for review August 5, 2023 23:46
@Vankata453
Copy link
Member Author

This PR is now ready for review.

@Vankata453 Vankata453 added this to the 0.7.0 milestone Jul 14, 2024
Copy link
Member

@MatusGuy MatusGuy left a comment

Choose a reason for hiding this comment

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

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

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

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

Aside from that, nice work!

src/gui/menu.cpp Outdated Show resolved Hide resolved
@Vankata453
Copy link
Member Author

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 Vankata453 requested a review from MatusGuy July 15, 2024 11:58
@MatusGuy
Copy link
Member

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

@Vankata453
Copy link
Member Author

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.

src/gui/menu.cpp Outdated Show resolved Hide resolved
src/gui/menu.cpp Outdated Show resolved Hide resolved
@MatusGuy
Copy link
Member

Hi back, I'm dad.

If I remember correctly, I remember that this PR didn't show the right aspect ratio for the source image when the screen resolution was smaller than the source picture... Something along those lines.

Copy link
Member

@weluvgoatz weluvgoatz left a comment

Choose a reason for hiding this comment

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

This feature works well and I am satisfied with the current implementation. One suggestion I have, though, is to make it so that the screenshot gets taken before the player presses the escape key, so that every screenshot doesn't have the escape menu in it. For example, the player presses escape -> take screenshot -> show escape menu.

@Vankata453
Copy link
Member Author

It shows the menu? It's supposed to hide whenever the screenshot is being taken.

@Frostwithasideofsalt
Copy link
Member

image

my one thing with this pr is how it displays the stats when theirs no preview image. it's really ugly, unclear and overwhelming. it would be much preferred if the stats just showed up like this if there wasnt any image to go along with it

@Frostwithasideofsalt
Copy link
Member

image

because of that it also tends to send stuff off the screen. it also seems to show the wrong level count for some reason? like in this image it says the bonus island remake has 60 levels when it only has 30. what i think whats happening is that it's counting the number of files in the level folder and using that for the level count, even if it's not a level file ...? im not too sure. but the number of levels it reports has so far been equal to the amount of files in the level folder. so yeah.

Copy link
Member

@Frostwithasideofsalt Frostwithasideofsalt left a comment

Choose a reason for hiding this comment

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

Even if that isn't the cause- there's for sure something inflating the level count by a lot. so the things im suggesting are:
-make level stats for a world without a screenshot display similarly to how their displayed when their is a screenshot
-fix the bug inflating level counts

@swagtoy
Copy link

swagtoy commented Nov 25, 2024

because of that it also tends to send stuff off the screen.

I dont think there would be a genuine way to fix this without refactoring the menus a bit using a scrollbar system of some sort. iirc this behavior is pretty poorly baked in. Best hack of a fix for now would be truncating long lines if we just wanna ship it as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code status:needs-review Work needs to be reviewed by other people type:feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants