Skip to content

Commit 1ecd1f4

Browse files
committed
Checkmark alignment when scrolling.
1 parent ce9dcd1 commit 1ecd1f4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/SquadMgr/SquadMgr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ void CSquadMgr::Render()
520520
}
521521
else
522522
{
523-
ImGui::RenderCheckMark(dl, ImGui::GetCursorPos() + ImGui::GetWindowPos(), successCol, sz);
523+
ImGui::RenderCheckMark(dl, ImGui::GetCursorPos() + ImGui::GetWindowPos() - ImVec2(ImGui::GetScrollX(), ImGui::GetScrollY()), successCol, sz);
524524
ImGui::Dummy(ImVec2(sz, sz));
525525
}
526526
}
@@ -658,8 +658,8 @@ void CSquadMgr::Render()
658658

659659
ImU32 textCol = ImU32(ImColor(ImGui::GetStyle().Colors[ImGuiCol_Text]));
660660

661-
if (summary.Alacrity) { ImGui::TableSetColumnIndex(alacIdx); ImGui::RenderCheckMark(dl, ImGui::GetCursorPos() + ImGui::GetWindowPos(), fullCoverage ? successCol : ImU32(ImColor(textCol)), sz); }
662-
if (summary.Quickness) { ImGui::TableSetColumnIndex(quicIdx); ImGui::RenderCheckMark(dl, ImGui::GetCursorPos() + ImGui::GetWindowPos(), fullCoverage ? successCol : ImU32(ImColor(textCol)), sz); }
661+
if (summary.Alacrity) { ImGui::TableSetColumnIndex(alacIdx); ImGui::RenderCheckMark(dl, ImGui::GetCursorPos() + ImGui::GetWindowPos() - ImVec2(ImGui::GetScrollX(), ImGui::GetScrollY()), fullCoverage ? successCol : ImU32(ImColor(textCol)), sz); }
662+
if (summary.Quickness) { ImGui::TableSetColumnIndex(quicIdx); ImGui::RenderCheckMark(dl, ImGui::GetCursorPos() + ImGui::GetWindowPos() - ImVec2(ImGui::GetScrollX(), ImGui::GetScrollY()), fullCoverage ? successCol : ImU32(ImColor(textCol)), sz); }
663663

664664
if (fullCoverage) { ImGui::PopStyleColor(); } // reset green text
665665

0 commit comments

Comments
 (0)