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;