-
Notifications
You must be signed in to change notification settings - Fork 121
feat(gui): Implement replay info tooltips in Replay Menu #1720
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
Conversation
xezon
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.
Looks promising.
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
Outdated
Show resolved
Hide resolved
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
Outdated
Show resolved
Hide resolved
| AsciiString replayFileNameAscii; | ||
| replayFileNameAscii.translate(replayFileName); | ||
|
|
||
| std::map<AsciiString, ReplayInfoCacheEntry>::const_iterator it = replayInfoCache.find(replayFileNameAscii); |
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.
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.
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.
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.
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.
What happens if we put Chinese Characters in Replay Name? Does it show and load?
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.
Replays with Chinese characters in the name do not show in retail.
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.
Dang. Maybe we can fix that in another change.
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
Outdated
Show resolved
Hide resolved
GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
Outdated
Show resolved
Hide resolved
ba6472e to
36bca60
Compare
Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
Outdated
Show resolved
Hide resolved
| UnicodeString mapStr = createMapName(asciistr, info, mapData); | ||
|
|
||
| // extra | ||
| UnicodeString extraStr = buildReplayTooltip(header, info); |
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.
perhaps call this tooltipStr instead.
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.
Still say extraStr but ok.
36bca60 to
ec3e6c6
Compare
ec3e6c6 to
9445a43
Compare
…kers#1720) Hovering a replay in the list will now show a tooltip with match duration, fps and human player names
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