mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +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;
|
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 )
|
void AchievementsMgr::FillMap( data::AchievementItem** items, data::AchievementCategory* category )
|
||||||
{
|
{
|
||||||
while( *items )
|
while( *items )
|
||||||
|
@ -66,6 +66,7 @@ public:
|
|||||||
void PopQueue();
|
void PopQueue();
|
||||||
|
|
||||||
bool NeedsAttention() const;
|
bool NeedsAttention() const;
|
||||||
|
bool CategoryNeedsAttention( const char* id ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void FillMap( data::AchievementItem** items, data::AchievementCategory* category );
|
void FillMap( data::AchievementItem** items, data::AchievementCategory* category );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user