Merge pull request #12857 from LillyJadeKatrin/retroachievements-osd-tweaks

RetroAchievements On Screen Tweaks
This commit is contained in:
JMC47 2024-06-16 12:26:58 -04:00 committed by GitHub
commit 0c2b8fd587
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -111,10 +111,12 @@ static float DrawMessage(int index, Message& msg, const ImVec2& position, int ti
{
ImGui::Image(msg.texture.get(), ImVec2(static_cast<float>(msg.icon->width),
static_cast<float>(msg.icon->height)));
ImGui::SameLine();
}
}
// Use %s in case message contains %.
if (msg.text.size() > 0)
ImGui::TextColored(ARGBToImVec4(msg.color), "%s", msg.text.c_str());
window_height =
ImGui::GetWindowSize().y + (WINDOW_PADDING * ImGui::GetIO().DisplayFramebufferScale.y);

View File

@ -357,9 +357,9 @@ void OnScreenUI::DrawChallengesAndLeaderboards()
float leaderboard_y = ImGui::GetIO().DisplaySize.y;
if (!m_challenge_texture_map.empty())
{
ImGui::SetNextWindowSize(ImVec2(0, 0));
ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x, ImGui::GetIO().DisplaySize.y), 0,
ImVec2(1.0, 1.0));
ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f));
ImVec2(1, 1));
if (ImGui::Begin("Challenges", nullptr,
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoInputs |
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings |
@ -370,9 +370,10 @@ void OnScreenUI::DrawChallengesAndLeaderboards()
{
ImGui::Image(texture.get(), ImVec2(static_cast<float>(texture->GetWidth()),
static_cast<float>(texture->GetHeight())));
ImGui::SameLine();
}
}
leaderboard_y -= ImGui::GetWindowHeight();
}
ImGui::End();
}