-
-
Notifications
You must be signed in to change notification settings - Fork 419
Don't do fade in switching between Campaign and Standard high score screens #10343
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
base: master
Are you sure you want to change the base?
Don't do fade in switching between Campaign and Standard high score screens #10343
Conversation
|
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 just applied changes: 640 x 480fheroes2.engine.version_.1.1.11.2025-11-06.12-58-46.mp43840 x 2160fheroes2.engine.version_.1.1.11.2025-11-06.13-02-15.mp4 |
|
Hi @ruben-montes , can you please address code style issues? |
Done |
ihhub
left a comment
There was a problem hiding this 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 ); |
There was a problem hiding this comment.
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?
closes #7409
fheroes2.engine.version_.1.1.11.2025-11-04.12-26-18.mp4