hide rather than disable newgame buttons when they can't be used

This commit is contained in:
Eric House 2015-03-05 06:42:33 -08:00
parent ed9ffc229d
commit 9565df7c69

View file

@ -998,9 +998,10 @@ public class GamesListDelegate extends ListDelegateBase
super.invalidateOptionsMenuIf();
if ( !XWPrefs.getHideNewgameButtons( m_activity ) ) {
boolean enable = 0 == m_selGames.size() && 1 >= m_selGroupIDs.size();
int vis = 0 == m_selGames.size() && 1 >= m_selGroupIDs.size()
? View.VISIBLE : View.GONE;
for ( Button button : m_newGameButtons ) {
button.setEnabled( enable );
button.setVisibility( vis );
}
}
}