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

Toggling level statistics #3063

Merged
merged 2 commits into from
Sep 29, 2024
Merged

Toggling level statistics #3063

merged 2 commits into from
Sep 29, 2024

Conversation

Vankata453
Copy link
Member

The coins, badguys and secrets level statistics can now be toggled from a level's settings. By default, coins and secrets are enabled, but badguys are not (due to a recent discussion regarding the difficulty of making it possible to kill all badguys in a level; can be discussed further).

A level is shown as "perfect" on a worldmap if only the enabled statistics are maxed out.

All code which draws statistics has been updated to incorporate this change as well. Statistics which are turned off will not be shown alongside others.

The coins, badguys and secrets level statistics can now be toggled from a level's settings. By default, coins and secrets are enabled, but badguys are not (due to a recent discussion regarding the difficulty of making it possible to kill all badguys in a level; can be discussed further).

A level is shown as "perfect" on a worldmap if only the enabled statistics are maxed out.

All code which draws statistics has been updated to incorporate this change as well. Statistics which are turned off will not be shown alongside others.
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.

tested it, it works.

@tobbi
Copy link
Member

tobbi commented Sep 21, 2024

Please fix -Wshadow:

 /Users/runner/work/supertux/supertux/src/supertux/statistics.cpp:322:11: error: declaration shadows a local variable [-Werror,-Wshadow]
    Color tcolor;
          ^
/Users/runner/work/supertux/supertux/src/supertux/statistics.cpp:300:9: note: previous declaration is here
  Color tcolor = Statistics::text_color;
        ^
1 error generated.

@MatusGuy MatusGuy merged commit 0fbe136 into master Sep 29, 2024
@Vankata453 Vankata453 deleted the toggle-level-stats branch September 29, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants