mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Allow checking if achievement category needs attention.
This commit is contained in:
parent
7401a72ccf
commit
a6b9369430
@ -159,6 +159,30 @@ bool AchievementsMgr::NeedsAttention() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AchievementsMgr::CategoryNeedsAttention( const char* id ) const
|
||||
{
|
||||
auto c = data::AchievementCategories;
|
||||
while( *c )
|
||||
{
|
||||
if( strcmp( (*c)->id, id ) == 0 )
|
||||
{
|
||||
for( auto& v : m_map )
|
||||
{
|
||||
if( v.second.category == (*c) )
|
||||
{
|
||||
auto& it = v.second.item;
|
||||
if( it->unlockTime > 0 && !it->hideNew ) return true;
|
||||
if( it->doneTime > 0 && !it->hideCompleted ) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
c++;
|
||||
}
|
||||
assert( false );
|
||||
return false;
|
||||
}
|
||||
|
||||
void AchievementsMgr::FillMap( data::AchievementItem** items, data::AchievementCategory* category )
|
||||
{
|
||||
while( *items )
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
void PopQueue();
|
||||
|
||||
bool NeedsAttention() const;
|
||||
bool CategoryNeedsAttention( const char* id ) const;
|
||||
|
||||
private:
|
||||
void FillMap( data::AchievementItem** items, data::AchievementCategory* category );
|
||||
|
Loading…
Reference in New Issue
Block a user