Skip to content

Conversation

@ruben-montes
Copy link

closes #7409

fheroes2.engine.version_.1.1.11.2025-11-04.12-26-18.mp4

@ihhub
Copy link
Owner

ihhub commented Nov 5, 2025

Hi @ruben-montes , is with these changes there no fading with opening the dialog for the first time? It should be by right. Please check it on the original (640x480) resolution.

@ruben-montes
Copy link
Author

Hi @ruben-montes , is with these changes there no fading with opening the dialog for the first time? It should be by right. Please check it on the original (640x480) resolution.

Hi @ihhub, for original (640x480) is still fading in clicking in Campaign/Standart, I need to fix that.

@ihhub ihhub added the ui UI/GUI related stuff label Nov 6, 2025
@ihhub ihhub added this to the 1.1.13 milestone Nov 6, 2025
@ihhub ihhub added the improvement New feature, request or improvement label Nov 6, 2025
@ruben-montes
Copy link
Author

@ihhub just applied changes:

640 x 480

fheroes2.engine.version_.1.1.11.2025-11-06.12-58-46.mp4

3840 x 2160

fheroes2.engine.version_.1.1.11.2025-11-06.13-02-15.mp4

@zenseii zenseii changed the title Dont fade in switching between Campaign and Standart high score Don't do fade in switching between Campaign and Standard high score screens Nov 6, 2025
@ihhub
Copy link
Owner

ihhub commented Nov 7, 2025

Hi @ruben-montes , can you please address code style issues?

@ruben-montes
Copy link
Author

Hi @ruben-montes , can you please address code style issues?

Done

Copy link
Owner

@ihhub ihhub left a comment

Choose a reason for hiding this comment

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

Hi @ruben-montes , I left one suggestion. Can you please take a look?


fheroes2::Display & display = fheroes2::Display::instance();
const bool isDefaultScreenSize = display.isDefaultSize();
const bool isComingFromMainMenu = ( Settings::Get().GetPreviousGameMode() == fheroes2::GameMode::MAIN_MENU );
Copy link
Owner

Choose a reason for hiding this comment

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

To avoid having an extra member for Settings (this is also not the right place for this variable) I suggest to do the following:

  • move all this code into a separate function in anonymous namespace, the function will have the following signature fheroes2::GameMode openHighScores const bool isCampaign, const bool isInternalUpdate )
  • the current function will have the code:
fheroes2::GameMode Game::DisplayHighScores( bool isCampaign )
{
    fheroes2::GameMode returnValue{ fheroes2::GameMode::HIGHSCORES_STANDARD };
    bool isInternalUpdate{ false };

    while ( returnValue == fheroes2::GameMode::HIGHSCORES_STANDARD || returnValue == fheroes2::GameMode::HIGHSCORES_CAMPAIGN ) {
        returnValue = openHighScores( isCampaign, isInternalUpdate );
        isInternalUpdate = true;
        isCampaign = ( returnValue == fheroes2::GameMode::HIGHSCORES_CAMPAIGN );
    }
}
  • revert all the changes in other files

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature, request or improvement ui UI/GUI related stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not do screen fading when switching between Campaign and Standard modes in High Scores dialog

2 participants