Skip to content

Commit

Permalink
Games: Added notification about added new games
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 15, 2013
1 parent 95650d8 commit 90c3ac7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doomsday/client/include/games.h
Expand Up @@ -67,6 +67,11 @@ class Games
*/
DENG2_DEFINE_AUDIENCE(GameChange, void currentGameChanged(Game &newGame))

/**
* Notified when a new game is added.
*/
DENG2_DEFINE_AUDIENCE(Addition, void gameAdded(Game &game))

public:
Games();

Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/games.cpp
Expand Up @@ -183,6 +183,11 @@ void Games::add(Game &game)
if(d->games.indexOf(&game) >= 0) return;

d->games.push_back(&game);

DENG2_FOR_AUDIENCE(Addition, i)
{
i->gameAdded(game);
}
}

void Games::locateStartupResources(Game &game)
Expand Down

0 comments on commit 90c3ac7

Please sign in to comment.