mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: show spell tooltip on hover in combat log
This commit is contained in:
parent
fe4fc714c3
commit
6ffc0cec3d
1 changed files with 10 additions and 0 deletions
|
|
@ -17511,6 +17511,16 @@ void GameScreen::renderCombatLog(game::GameHandler& gameHandler) {
|
|||
ImGui::TextDisabled("%s", timeBuf);
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::TextColored(color, "%s", desc);
|
||||
// Hover tooltip: show rich spell info for entries with a known spell
|
||||
if (e.spellId != 0 && ImGui::IsItemHovered()) {
|
||||
auto* assetMgrLog = core::Application::getInstance().getAssetManager();
|
||||
ImGui::BeginTooltip();
|
||||
bool richOk = spellbookScreen.renderSpellInfoTooltip(e.spellId, gameHandler, assetMgrLog);
|
||||
if (!richOk) {
|
||||
ImGui::Text("%s", spellName.c_str());
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-scroll to bottom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue