mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
feat: show debuff type and spell names on party frame debuff dot hover
This commit is contained in:
parent
2268f7ac34
commit
d46feee4fc
1 changed files with 14 additions and 0 deletions
|
|
@ -8463,6 +8463,20 @@ void GameScreen::renderPartyFrames(game::GameHandler& gameHandler) {
|
||||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, dotCol);
|
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, dotCol);
|
||||||
ImGui::Button("##d", ImVec2(8.0f, 8.0f));
|
ImGui::Button("##d", ImVec2(8.0f, 8.0f));
|
||||||
ImGui::PopStyleColor(2);
|
ImGui::PopStyleColor(2);
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
static const char* kDispelNames[] = { "", "Magic", "Curse", "Disease", "Poison" };
|
||||||
|
// Find spell name(s) of this dispel type
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::TextColored(dotCol, "%s", kDispelNames[dt]);
|
||||||
|
for (const auto& da : *unitAuras) {
|
||||||
|
if (da.isEmpty() || (da.flags & 0x80) == 0) continue;
|
||||||
|
if (gameHandler.getSpellDispelType(da.spellId) != dt) continue;
|
||||||
|
const std::string& dName = gameHandler.getSpellName(da.spellId);
|
||||||
|
if (!dName.empty())
|
||||||
|
ImGui::Text(" %s", dName.c_str());
|
||||||
|
}
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue