Skip to content

Commit

Permalink
fix tooltips hiding behind hd cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Dec 22, 2022
1 parent cb843ef commit 71390ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/injected/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2783,7 +2783,11 @@ void tooltip(const char* tip)
return;
if (ImGui::IsItemHovered())
{
ImGuiContext& g = *GImGui;
if (options["hd_cursor"])
g.Style.MouseCursorScale = 1.5f;
ImGui::SetTooltip("%s", tip);
g.Style.MouseCursorScale = 1.0f;
}
}

Expand All @@ -2793,6 +2797,9 @@ void tooltip(const char* tip, const char* key)
return;
if (ImGui::IsItemHovered())
{
ImGuiContext& g = *GImGui;
if (options["hd_cursor"])
g.Style.MouseCursorScale = 1.5f;
if (key && keys[key])
{
ImGui::SetTooltip("(%s) %s", key_string(keys[key]).c_str(), tip);
Expand All @@ -2801,6 +2808,7 @@ void tooltip(const char* tip, const char* key)
{
ImGui::SetTooltip("%s", tip);
}
g.Style.MouseCursorScale = 1.0f;
}
}

Expand Down

0 comments on commit 71390ae

Please sign in to comment.