remove turn-on-option part of picking tiles into tray. If you enable

it for a game you're stuck with it.  Less complex UI is better.
This commit is contained in:
ehouse 2003-12-13 18:40:17 +00:00
parent 2546a816b4
commit 240b314ff8
6 changed files with 3 additions and 26 deletions

View file

@ -230,7 +230,6 @@ gi_initPlayerInfo( MPFORMAL CurGameInfo* gi, XP_UCHAR* nameTemplate )
gi->timerEnabled = XP_FALSE;
gi->gameSeconds = 25 * 60; /* 25 minute game is common? */
#ifdef FEATURE_TRAY_EDIT
gi->enablePickTiles = XP_FALSE;
gi->allowPickTiles = XP_FALSE;
#endif
@ -301,7 +300,6 @@ gi_copy( MPFORMAL CurGameInfo* destGI, CurGameInfo* srcGI )
destGI->robotSmartness = (XP_U8)srcGI->robotSmartness;
destGI->phoniesAction = srcGI->phoniesAction;
#ifdef FEATURE_TRAY_EDIT
destGI->enablePickTiles = srcGI->enablePickTiles;
destGI->allowPickTiles = srcGI->allowPickTiles;
#endif
@ -340,10 +338,8 @@ gi_readFromStream( MPFORMAL XWStreamCtxt* stream, XP_U16 strVersion,
gi->timerEnabled = stream_getBits( stream, 1 );
#ifdef FEATURE_TRAY_EDIT
if ( strVersion >= CUR_STREAM_VERS ) {
gi->enablePickTiles = stream_getBits( stream, 1 );
gi->allowPickTiles = stream_getBits( stream, 1 );
} else {
gi->enablePickTiles = XP_FALSE;
gi->allowPickTiles = XP_FALSE;
}
#endif
@ -389,7 +385,6 @@ gi_writeToStream( XWStreamCtxt* stream, CurGameInfo* gi )
stream_putBits( stream, 2, gi->phoniesAction );
stream_putBits( stream, 1, gi->timerEnabled );
#ifdef FEATURE_TRAY_EDIT
stream_putBits( stream, 1, gi->enablePickTiles );
stream_putBits( stream, 1, gi->allowPickTiles );
#endif

View file

@ -59,7 +59,6 @@ typedef struct CurGameInfo {
XP_Bool hintsNotAllowed;
XP_Bool timerEnabled;
#ifdef FEATURE_TRAY_EDIT
XP_Bool enablePickTiles; /* make the next option available */
XP_Bool allowPickTiles;
#endif
XP_U8 robotSmartness;

View file

@ -364,10 +364,8 @@ BEGIN
EDITABLE SINGLELINE NUMERIC MAXCHARS 3
#ifdef FEATURE_TRAY_EDIT
CHECKBOX "Can pick tiles" ID XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID \
CHECKBOX "Allow pick tiles" ID XW_PREFS_PICKTILES_CHECKBOX_ID \
AT (LEFTCOL PREVBOTTOM AUTO AUTO) NONUSABLE
CHECKBOX "Do pick tiles" ID XW_PREFS_PICKTILES_CHECKBOX_ID \
AT (PREVRIGHT+5 PREVTOP AUTO AUTO) NONUSABLE
#endif
/* buttons at the bottom */

View file

@ -165,7 +165,6 @@ typedef struct PrefsDlgState {
XP_Bool timerEnabled;
#ifdef FEATURE_TRAY_EDIT
XP_Bool allowPickTiles;
XP_Bool enablePickTiles;
#endif
} PrefsDlgState;

View file

@ -117,9 +117,6 @@ PrefsFormHandleEvent( EventPtr event )
case XW_PREFS_TIMERON_CHECKBOX_ID:
XP_ASSERT( globals->isNewGame );
#ifdef FEATURE_TRAY_EDIT
case XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID:
#endif
form = FrmGetActiveForm();
showHidePrefsWidgets( globals, form );
break;
@ -156,7 +153,7 @@ dropCtlUnlessNewGame( PalmAppGlobals* globals, XP_U16 id )
case XW_PREFS_TIMERON_CHECKBOX_ID:
case XW_PREFS_TIMER_FIELD_ID:
#ifdef FEATURE_TRAY_EDIT
case XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID:
case XW_PREFS_PICKTILES_CHECKBOX_ID:
#endif
if ( globals->isNewGame ) {
break;
@ -198,7 +195,6 @@ GlobalPrefsToLocal( PalmAppGlobals* globals )
state->gameSeconds = globals->util.gameInfo->gameSeconds;
#ifdef FEATURE_TRAY_EDIT
state->allowPickTiles = globals->util.gameInfo->allowPickTiles;
state->enablePickTiles = globals->util.gameInfo->enablePickTiles;
#endif
state->stateTypeIsGlobal = globals->stateTypeIsGlobal;
@ -233,7 +229,6 @@ LocalPrefsToGlobal( PalmAppGlobals* globals )
#ifdef FEATURE_TRAY_EDIT
globals->util.gameInfo->allowPickTiles = state->allowPickTiles;
globals->util.gameInfo->enablePickTiles = state->enablePickTiles;
#endif
return erase;
@ -271,8 +266,6 @@ localPrefsToControls( PalmAppGlobals* globals, PrefsDlgState* state )
setBooleanCtrl( XW_PREFS_TIMERON_CHECKBOX_ID, state->timerEnabled );
#ifdef FEATURE_TRAY_EDIT
setBooleanCtrl( XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID,
state->enablePickTiles );
setBooleanCtrl( XW_PREFS_PICKTILES_CHECKBOX_ID, state->allowPickTiles );
#endif
@ -313,8 +306,6 @@ controlsToLocalPrefs( PalmAppGlobals* globals, PrefsDlgState* state )
state->gameSeconds = fieldToNum( XW_PREFS_TIMER_FIELD_ID ) * 60;
#ifdef FEATURE_TRAY_EDIT
state->enablePickTiles =
getBooleanCtrl( XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID );
state->allowPickTiles =
getBooleanCtrl( XW_PREFS_PICKTILES_CHECKBOX_ID );
#endif
@ -373,10 +364,6 @@ showHidePrefsWidgets( PalmAppGlobals* globals, FormPtr form )
if ( !global ) {
Boolean on = getBooleanCtrl( XW_PREFS_TIMERON_CHECKBOX_ID );
disOrEnable( form, XW_PREFS_TIMER_FIELD_ID, on );
#ifdef FEATURE_TRAY_EDIT
on = getBooleanCtrl( XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID );
disOrEnable( form, XW_PREFS_PICKTILES_CHECKBOX_ID, on );
#endif
}
} /* showHidePrefsWidgets */

View file

@ -253,8 +253,7 @@
#define XW_PREFS_TIMERON_CHECKBOX_ID 2721
#define XW_PREFS_TIMER_FIELD_ID 2722
#ifdef FEATURE_TRAY_EDIT
# define XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID 2723
# define XW_PREFS_PICKTILES_CHECKBOX_ID 2724
# define XW_PREFS_PICKTILES_CHECKBOX_ID 2723
#endif
/* These aren't part of the hide/show thing as they're displayed only