Skip to content

Commit

Permalink
UI|Client|GamesDialog: Cannot switch to the currently loaded game
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 12, 2014
1 parent 5cc9b85 commit a62d897
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ DENG_GUI_PIMPL(SingleplayerSessionMenuWidget)

GameItem(Game const &gameRef,
de::String const &label,
//RefArg<de::Action> action,
SingleplayerSessionMenuWidget &owner)
: ui::ImageItem(ShownAsButton, label/*, action*/)
: ui::ImageItem(ShownAsButton, label)
, SessionItem(owner)
, game(gameRef)
{
Expand Down Expand Up @@ -154,8 +153,10 @@ DENG_GUI_PIMPL(SingleplayerSessionMenuWidget)

w.show(shouldBeShown(item.game));

bool const isCurrentLoadedGame = (&App_CurrentGame() == &item.game);

// Can be loaded?
w.loadButton().enable(item.game.allStartupFilesFound());
w.loadButton().enable(item.game.allStartupFilesFound() && !isCurrentLoadedGame);
}

void updateGameAvailability()
Expand Down

0 comments on commit a62d897

Please sign in to comment.