mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 20:15:32 +00:00
FullscreenUI: Fix loading screen font
This commit is contained in:
parent
bed3dd6950
commit
2b4e60a5bf
@ -3012,9 +3012,13 @@ void ImGuiFullscreen::DrawLoadingScreen(std::string_view image, std::string_view
|
|||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
const float padding_and_rounding = 18.0f * scale;
|
const float padding_and_rounding = 18.0f * scale;
|
||||||
|
const float frame_rounding = 6.0f * scale;
|
||||||
|
const float bar_height = ImCeil(ImGuiManager::GetOSDFont()->FontSize * 1.1f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, padding_and_rounding);
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, padding_and_rounding);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(padding_and_rounding, padding_and_rounding));
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(padding_and_rounding, padding_and_rounding));
|
||||||
ImGui::SetNextWindowSize(ImVec2(width, ((has_progress || is_persistent) ? 90.0f : 55.0f) * scale), ImGuiCond_Always);
|
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, frame_rounding);
|
||||||
|
ImGui::PushFont(ImGuiManager::GetOSDFont());
|
||||||
|
ImGui::SetNextWindowSize(ImVec2(width, ((has_progress || is_persistent) ? 85.0f : 55.0f) * scale), ImGuiCond_Always);
|
||||||
ImGui::SetNextWindowPos(ImVec2(io.DisplaySize.x * 0.5f, (io.DisplaySize.y * 0.5f) + (100.0f * scale)),
|
ImGui::SetNextWindowPos(ImVec2(io.DisplaySize.x * 0.5f, (io.DisplaySize.y * 0.5f) + (100.0f * scale)),
|
||||||
ImGuiCond_Always, ImVec2(0.5f, 0.0f));
|
ImGuiCond_Always, ImVec2(0.5f, 0.0f));
|
||||||
if (ImGui::Begin("LoadingScreen", nullptr,
|
if (ImGui::Begin("LoadingScreen", nullptr,
|
||||||
@ -3043,7 +3047,7 @@ void ImGuiFullscreen::DrawLoadingScreen(std::string_view image, std::string_view
|
|||||||
ImGui::ProgressBar(has_progress ?
|
ImGui::ProgressBar(has_progress ?
|
||||||
(static_cast<float>(progress_value) / static_cast<float>(progress_max - progress_min)) :
|
(static_cast<float>(progress_value) / static_cast<float>(progress_max - progress_min)) :
|
||||||
static_cast<float>(-ImGui::GetTime()),
|
static_cast<float>(-ImGui::GetTime()),
|
||||||
ImVec2(-1.0f, 0.0f), "");
|
ImVec2(-1.0f, bar_height), "");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3056,7 +3060,8 @@ void ImGuiFullscreen::DrawLoadingScreen(std::string_view image, std::string_view
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
ImGui::PopStyleVar(2);
|
ImGui::PopFont();
|
||||||
|
ImGui::PopStyleVar(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user