Achievements: Fix fullscreen window height

This commit is contained in:
Stenzek 2024-04-18 22:35:38 +10:00 committed by Connor McLaughlin
parent a9311142dc
commit c0b36a482a
1 changed files with 9 additions and 3 deletions

View File

@ -2259,7 +2259,9 @@ void Achievements::DrawAchievementsWindow()
ImGui::SetNextWindowBgAlpha(alpha); ImGui::SetNextWindowBgAlpha(alpha);
if (ImGuiFullscreen::BeginFullscreenWindow(ImVec2(0.0f, heading_height), ImVec2(display_size.x, display_size.y - heading_height), if (ImGuiFullscreen::BeginFullscreenWindow(
ImVec2(0.0f, heading_height),
ImVec2(display_size.x, display_size.y - heading_height - LayoutScale(ImGuiFullscreen::LAYOUT_FOOTER_HEIGHT)),
"achievements", background, 0.0f, 0.0f, 0)) "achievements", background, 0.0f, 0.0f, 0))
{ {
static bool buckets_collapsed[NUM_RC_CLIENT_ACHIEVEMENT_BUCKETS] = {}; static bool buckets_collapsed[NUM_RC_CLIENT_ACHIEVEMENT_BUCKETS] = {};
@ -2687,7 +2689,9 @@ void Achievements::DrawLeaderboardsWindow()
if (!is_leaderboard_open) if (!is_leaderboard_open)
{ {
if (ImGuiFullscreen::BeginFullscreenWindow(ImVec2(0.0f, heading_height), ImVec2(display_size.x, display_size.y - heading_height), if (ImGuiFullscreen::BeginFullscreenWindow(
ImVec2(0.0f, heading_height),
ImVec2(display_size.x, display_size.y - heading_height - LayoutScale(ImGuiFullscreen::LAYOUT_FOOTER_HEIGHT)),
"leaderboards", background, 0.0f, 0.0f, 0)) "leaderboards", background, 0.0f, 0.0f, 0))
{ {
ImGuiFullscreen::BeginMenuButtons(); ImGuiFullscreen::BeginMenuButtons();
@ -2705,7 +2709,9 @@ void Achievements::DrawLeaderboardsWindow()
} }
else else
{ {
if (ImGuiFullscreen::BeginFullscreenWindow(ImVec2(0.0f, heading_height), ImVec2(display_size.x, display_size.y - heading_height), if (ImGuiFullscreen::BeginFullscreenWindow(
ImVec2(0.0f, heading_height),
ImVec2(display_size.x, display_size.y - heading_height - LayoutScale(ImGuiFullscreen::LAYOUT_FOOTER_HEIGHT)),
"leaderboard", background, 0.0f, 0.0f, 0)) "leaderboard", background, 0.0f, 0.0f, 0))
{ {
ImGuiFullscreen::BeginMenuButtons(); ImGuiFullscreen::BeginMenuButtons();