From 2e9dfb8fdf09a5505cf0076fed55d6c6fc05b5e4 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 1 Nov 2026 20:26:22 +0100 Subject: [PATCH] Add visibility predicates to achievements. --- profiler/src/main.cpp | 1 + profiler/src/profiler/TracyAchievements.cpp | 2 ++ profiler/src/profiler/TracyAchievements.hpp | 1 + 3 files changed, 4 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index bc6e0e08..53db821b 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -533,6 +533,7 @@ static void DrawAchievements( tracy::data::AchievementItem** items ) while( *items ) { auto& it = *items++; + if( it->visible && !it->visible() ) continue; if( it->unlockTime > 0 ) { if( it->doneTime > 0 ) ImGui::PushStyleColor( ImGuiCol_Text, GImGui->Style.Colors[ImGuiCol_TextDisabled] ); diff --git a/profiler/src/profiler/TracyAchievements.cpp b/profiler/src/profiler/TracyAchievements.cpp index 32c1093c..7688ecc6 100644 --- a/profiler/src/profiler/TracyAchievements.cpp +++ b/profiler/src/profiler/TracyAchievements.cpp @@ -171,6 +171,7 @@ bool AchievementsMgr::NeedsAttention() const for( auto& v : m_map ) { auto& it = v.second.item; + if( it->visible && !it->visible() ) continue; if( it->unlockTime > 0 && !it->hideNew ) return true; if( it->doneTime > 0 && !it->hideCompleted ) return true; } @@ -189,6 +190,7 @@ bool AchievementsMgr::CategoryNeedsAttention( const char* id ) const if( v.second.category == (*c) ) { auto& it = v.second.item; + if( it->visible && !it->visible() ) continue; if( it->unlockTime > 0 && !it->hideNew ) return true; if( it->doneTime > 0 && !it->hideCompleted ) return true; } diff --git a/profiler/src/profiler/TracyAchievements.hpp b/profiler/src/profiler/TracyAchievements.hpp index 76a6f6f7..bb0a616b 100644 --- a/profiler/src/profiler/TracyAchievements.hpp +++ b/profiler/src/profiler/TracyAchievements.hpp @@ -23,6 +23,7 @@ struct AchievementItem std::string text; AchievementItem** items; AchievementItem** unlocks; + bool (*visible)(); bool keepOpen; uint64_t unlockTime; uint64_t doneTime;