Achievements: Fix fullscreen window height

This commit is contained in:
Stenzek 2024-04-18 20:09:56 +10:00
parent 8e9e855747
commit 60f12e77fa
No known key found for this signature in database

View File

@ -2286,9 +2286,10 @@ void Achievements::DrawAchievementsWindow()
ImGui::SetNextWindowBgAlpha(alpha); ImGui::SetNextWindowBgAlpha(alpha);
if (ImGuiFullscreen::BeginFullscreenWindow(ImVec2(0.0f, heading_height), if (ImGuiFullscreen::BeginFullscreenWindow(
ImVec2(display_size.x, display_size.y - heading_height), "achievements", ImVec2(0.0f, heading_height),
background, 0.0f, 0.0f, 0)) ImVec2(display_size.x, display_size.y - heading_height - LayoutScale(ImGuiFullscreen::LAYOUT_FOOTER_HEIGHT)),
"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] = {};
static const char* bucket_names[NUM_RC_CLIENT_ACHIEVEMENT_BUCKETS] = { static const char* bucket_names[NUM_RC_CLIENT_ACHIEVEMENT_BUCKETS] = {
@ -2750,9 +2751,10 @@ void Achievements::DrawLeaderboardsWindow()
if (!is_leaderboard_open) if (!is_leaderboard_open)
{ {
if (ImGuiFullscreen::BeginFullscreenWindow(ImVec2(0.0f, heading_height), if (ImGuiFullscreen::BeginFullscreenWindow(
ImVec2(display_size.x, display_size.y - heading_height), "leaderboards", ImVec2(0.0f, heading_height),
background, 0.0f, 0.0f, 0)) ImVec2(display_size.x, display_size.y - heading_height - LayoutScale(ImGuiFullscreen::LAYOUT_FOOTER_HEIGHT)),
"leaderboards", background, 0.0f, 0.0f, 0))
{ {
ImGuiFullscreen::BeginMenuButtons(); ImGuiFullscreen::BeginMenuButtons();
@ -2769,9 +2771,10 @@ void Achievements::DrawLeaderboardsWindow()
} }
else else
{ {
if (ImGuiFullscreen::BeginFullscreenWindow(ImVec2(0.0f, heading_height), if (ImGuiFullscreen::BeginFullscreenWindow(
ImVec2(display_size.x, display_size.y - heading_height), "leaderboard", ImVec2(0.0f, heading_height),
background, 0.0f, 0.0f, 0)) ImVec2(display_size.x, display_size.y - heading_height - LayoutScale(ImGuiFullscreen::LAYOUT_FOOTER_HEIGHT)),
"leaderboard", background, 0.0f, 0.0f, 0))
{ {
ImGuiFullscreen::BeginMenuButtons(); ImGuiFullscreen::BeginMenuButtons();