Stack Challenge Icons Horizontally

This commit is contained in:
LillyJadeKatrin 2024-06-13 23:39:46 -04:00
parent a79f428972
commit 9e1f5ed4b5

View File

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