mirror of https://github.com/PCSX2/pcsx2.git
UI: Fix vertical alignment of achievement progress text
This commit is contained in:
parent
123cd3a092
commit
42cd80c172
|
@ -2266,7 +2266,9 @@ void Achievements::DrawAchievementsWindow()
|
|||
ImGui::GetColorU32(ImGuiFullscreen::UISecondaryColor));
|
||||
|
||||
text.format("{}%", static_cast<int>(std::round(fraction * 100.0f)));
|
||||
ImGui::PushFont(g_medium_font);
|
||||
text_size = ImGui::CalcTextSize(text.c_str(), text.end_ptr());
|
||||
ImGui::PopFont();
|
||||
const ImVec2 text_pos(progress_bb.Min.x + ((progress_bb.Max.x - progress_bb.Min.x) / 2.0f) - (text_size.x / 2.0f),
|
||||
progress_bb.Min.y + ((progress_bb.Max.y - progress_bb.Min.y) / 2.0f) - (text_size.y / 2.0f));
|
||||
dl->AddText(g_medium_font, g_medium_font->FontSize, text_pos, ImGui::GetColorU32(ImGuiFullscreen::UIPrimaryTextColor),
|
||||
|
|
Loading…
Reference in New Issue