impr: Various web build improvements, API cleanup (#1541)

This commit is contained in:
Nik
2024-02-10 23:31:05 +01:00
committed by GitHub
parent 4b20e35fd2
commit bcbcb1f23c
43 changed files with 977 additions and 847 deletions

View File

@@ -160,7 +160,7 @@ namespace hex::plugin::builtin {
}
void drawOverlay(ImDrawList *drawList, ImVec2 windowMin, ImVec2 windowMax, const std::string &currCategory) {
auto &achievements = AchievementManager::getAchievements()[currCategory];
auto &achievements = AchievementManager::getAchievements().at(currCategory);
// Calculate number of achievements that have been unlocked
const auto unlockedCount = std::count_if(achievements.begin(), achievements.end(), [](const auto &entry) {
@@ -313,7 +313,7 @@ namespace hex::plugin::builtin {
// Draw each individual achievement category
for (const auto &categoryName : categories) {
const auto &achievements = startNodes[categoryName];
const auto &achievements = startNodes.at(categoryName);
// Check if any achievements in the category are unlocked or unlockable
bool visible = false;