Skip to content

Fix Replay GUI #398

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

helmutbuhler
Copy link

This fixes two issues in the Load Replay GUI:

  • If a replay whose map is not in the mapcache is present, it will now continue to display correctly. (Before it tried to display the absolute path of the map, which the gui cannot handle)
  • There is no longer a limit of 100 replays max.

@DevGeniusCode DevGeniusCode added Bug Something is not working right Major Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour GUI For graphical user interface labels Mar 9, 2025
@DevGeniusCode
Copy link

@DevGeniusCode DevGeniusCode added Critical Severity: Minor < Major < Critical < Blocker and removed Major Severity: Minor < Major < Critical < Blocker labels Mar 9, 2025
@helmutbuhler
Copy link
Author

I just fixed two more issues:

  • When opening a replay with mismatched version via double-click no warning appeared, now it does
  • When opening a replay with a map that is no longer present, the game crashed, now it shows an error message

While I was at it, I also display those missing map names in red.

I also had to factor some code into a helper function, which sadly makes the diff a bit harder to understand. I suggest code review by commit.

Copy link

@Generalcamo Generalcamo left a comment

Choose a reason for hiding this comment

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

We may need a solution to handle inserting new strings into .csf files through an EXE, as a fallback option.


if(!success || md == NULL)
{
MessageBoxOk(UnicodeString(L"MAP NOT FOUND"), UnicodeString(L"This replay cannot be loaded because the map is not present."), NULL);

Choose a reason for hiding this comment

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

New strings should be defined strings editable in CSF or STR, not hard-coded.

{
parentReplayMenu->winHide(TRUE);
MessageBoxOk(UnicodeString(L"MAP NOT FOUND"), UnicodeString(L"This replay cannot be loaded because the map is not present."), NULL);

Choose a reason for hiding this comment

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

Ditto

@helmutbuhler
Copy link
Author

Well, we will probably add more strings that need to be localized for the next patch, so I think we should handle that in a separate PR.
I suggest this:

  • I add a @todo:TEXT to those two lines here
  • I create a new issue that mentions that todo
    Is that ok?

@xezon
Copy link

xezon commented Apr 21, 2025

If a replay whose map is not in the mapcache is present, it will now continue to display correctly

This part is merged with #732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working right Critical Severity: Minor < Major < Critical < Blocker GUI For graphical user interface ZH Relates to Zero Hour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replay Menu looks broken when a replay with missing map file is listed
4 participants