Skip to content

Conversation

@Stubbjax
Copy link

This change introduces the ability to hover replays in the replays menu to observe additional data in the tooltip, including the duration and the players involved. This mostly leverages existing (previously disabled) logic with a few minor tweaks to make it a bit more tooltip-friendly.

TOOLTIPS.mp4

@Stubbjax Stubbjax self-assigned this Oct 20, 2025
@Stubbjax Stubbjax added Enhancement Is new feature or request GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Oct 20, 2025
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

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

Looks promising.

AsciiString replayFileNameAscii;
replayFileNameAscii.translate(replayFileName);

std::map<AsciiString, ReplayInfoCacheEntry>::const_iterator it = replayInfoCache.find(replayFileNameAscii);
Copy link

Choose a reason for hiding this comment

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

Can we use UnicodeString as map key here?

But it looks like the other function also uses AsciiString for Replay Names. It is strange that it does that and I wonder how this works with non ascii chars.

Copy link
Author

Choose a reason for hiding this comment

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

I did initially try this but it caused replayInfoCache[asciistr] = entry; to fail, so either way a conversion is required. I can replace it with an AsciiString → UnicodeString translation.

Copy link

Choose a reason for hiding this comment

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

What happens if we put Chinese Characters in Replay Name? Does it show and load?

Copy link
Author

Choose a reason for hiding this comment

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

Replays with Chinese characters in the name do not show in retail.

Copy link

Choose a reason for hiding this comment

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

Dang. Maybe we can fix that in another change.

@Stubbjax Stubbjax force-pushed the replay-info-tooltips branch from ba6472e to 36bca60 Compare October 24, 2025 12:01
UnicodeString mapStr = createMapName(asciistr, info, mapData);

// extra
UnicodeString extraStr = buildReplayTooltip(header, info);
Copy link

Choose a reason for hiding this comment

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

perhaps call this tooltipStr instead.

Copy link

Choose a reason for hiding this comment

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

Still say extraStr but ok.

@Stubbjax Stubbjax force-pushed the replay-info-tooltips branch from 36bca60 to ec3e6c6 Compare October 26, 2025 04:38
@Stubbjax Stubbjax force-pushed the replay-info-tooltips branch from ec3e6c6 to 9445a43 Compare October 27, 2025 14:09
@xezon xezon changed the title feat: Add replay info tooltips feat(gui): Add replay info tooltips Oct 27, 2025
@xezon xezon added the Approved Pull Request was approved label Oct 27, 2025
@xezon xezon changed the title feat(gui): Add replay info tooltips feat(gui): Implement replay info tooltips in Replay Menu Oct 28, 2025
@xezon xezon merged commit 834f369 into TheSuperHackers:main Oct 28, 2025
18 checks passed
@Stubbjax Stubbjax deleted the replay-info-tooltips branch October 29, 2025 01:49
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
…kers#1720)

Hovering a replay in the list will now show a tooltip with match duration, fps and human player names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Pull Request was approved Enhancement Is new feature or request Gen Relates to Generals GUI For graphical user interface Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants