don't recomment tapping the pts area of tray when it's not visible

This commit is contained in:
Eric House 2013-10-01 07:48:58 -07:00
parent 4abc9623f9
commit c294ad45cf
2 changed files with 10 additions and 2 deletions

View file

@ -772,8 +772,15 @@ public class BoardActivity extends XWActivity
int id = item.getItemId();
switch ( id ) {
case R.id.board_menu_done:
showNotAgainDlgThen( R.string.not_again_done,
R.string.key_notagain_done, COMMIT_ACTION );
int nTiles = XwJNI.model_getNumTilesInTray( m_jniGamePtr,
m_view.getCurPlayer() );
DbgUtils.logf( "getNumTilesInTray=>%d", nTiles );
if ( XWApp.MAX_TRAY_TILES > nTiles ) {
showNotAgainDlgThen( R.string.not_again_done,
R.string.key_notagain_done, COMMIT_ACTION );
} else {
dlgButtonClicked( COMMIT_ACTION, AlertDialog.BUTTON_POSITIVE );
}
break;
case R.id.board_menu_trade_commit:

View file

@ -40,6 +40,7 @@ public class XWApp extends Application {
public static final boolean UDP_ENABLED = true;
public static final String SMS_PUBLIC_HEADER = "-XW4";
public static final int MAX_TRAY_TILES = 7; // comtypes.h
private static UUID s_UUID = null;
private static Boolean s_onEmulator = null;