mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
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:
parent
2546a816b4
commit
240b314ff8
6 changed files with 3 additions and 26 deletions
|
@ -230,7 +230,6 @@ gi_initPlayerInfo( MPFORMAL CurGameInfo* gi, XP_UCHAR* nameTemplate )
|
||||||
gi->timerEnabled = XP_FALSE;
|
gi->timerEnabled = XP_FALSE;
|
||||||
gi->gameSeconds = 25 * 60; /* 25 minute game is common? */
|
gi->gameSeconds = 25 * 60; /* 25 minute game is common? */
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
gi->enablePickTiles = XP_FALSE;
|
|
||||||
gi->allowPickTiles = XP_FALSE;
|
gi->allowPickTiles = XP_FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -301,7 +300,6 @@ gi_copy( MPFORMAL CurGameInfo* destGI, CurGameInfo* srcGI )
|
||||||
destGI->robotSmartness = (XP_U8)srcGI->robotSmartness;
|
destGI->robotSmartness = (XP_U8)srcGI->robotSmartness;
|
||||||
destGI->phoniesAction = srcGI->phoniesAction;
|
destGI->phoniesAction = srcGI->phoniesAction;
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
destGI->enablePickTiles = srcGI->enablePickTiles;
|
|
||||||
destGI->allowPickTiles = srcGI->allowPickTiles;
|
destGI->allowPickTiles = srcGI->allowPickTiles;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -340,10 +338,8 @@ gi_readFromStream( MPFORMAL XWStreamCtxt* stream, XP_U16 strVersion,
|
||||||
gi->timerEnabled = stream_getBits( stream, 1 );
|
gi->timerEnabled = stream_getBits( stream, 1 );
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
if ( strVersion >= CUR_STREAM_VERS ) {
|
if ( strVersion >= CUR_STREAM_VERS ) {
|
||||||
gi->enablePickTiles = stream_getBits( stream, 1 );
|
|
||||||
gi->allowPickTiles = stream_getBits( stream, 1 );
|
gi->allowPickTiles = stream_getBits( stream, 1 );
|
||||||
} else {
|
} else {
|
||||||
gi->enablePickTiles = XP_FALSE;
|
|
||||||
gi->allowPickTiles = XP_FALSE;
|
gi->allowPickTiles = XP_FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -389,7 +385,6 @@ gi_writeToStream( XWStreamCtxt* stream, CurGameInfo* gi )
|
||||||
stream_putBits( stream, 2, gi->phoniesAction );
|
stream_putBits( stream, 2, gi->phoniesAction );
|
||||||
stream_putBits( stream, 1, gi->timerEnabled );
|
stream_putBits( stream, 1, gi->timerEnabled );
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
stream_putBits( stream, 1, gi->enablePickTiles );
|
|
||||||
stream_putBits( stream, 1, gi->allowPickTiles );
|
stream_putBits( stream, 1, gi->allowPickTiles );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,6 @@ typedef struct CurGameInfo {
|
||||||
XP_Bool hintsNotAllowed;
|
XP_Bool hintsNotAllowed;
|
||||||
XP_Bool timerEnabled;
|
XP_Bool timerEnabled;
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
XP_Bool enablePickTiles; /* make the next option available */
|
|
||||||
XP_Bool allowPickTiles;
|
XP_Bool allowPickTiles;
|
||||||
#endif
|
#endif
|
||||||
XP_U8 robotSmartness;
|
XP_U8 robotSmartness;
|
||||||
|
|
|
@ -364,10 +364,8 @@ BEGIN
|
||||||
EDITABLE SINGLELINE NUMERIC MAXCHARS 3
|
EDITABLE SINGLELINE NUMERIC MAXCHARS 3
|
||||||
|
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#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
|
AT (LEFTCOL PREVBOTTOM AUTO AUTO) NONUSABLE
|
||||||
CHECKBOX "Do pick tiles" ID XW_PREFS_PICKTILES_CHECKBOX_ID \
|
|
||||||
AT (PREVRIGHT+5 PREVTOP AUTO AUTO) NONUSABLE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
|
|
|
@ -165,7 +165,6 @@ typedef struct PrefsDlgState {
|
||||||
XP_Bool timerEnabled;
|
XP_Bool timerEnabled;
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
XP_Bool allowPickTiles;
|
XP_Bool allowPickTiles;
|
||||||
XP_Bool enablePickTiles;
|
|
||||||
#endif
|
#endif
|
||||||
} PrefsDlgState;
|
} PrefsDlgState;
|
||||||
|
|
||||||
|
|
|
@ -117,9 +117,6 @@ PrefsFormHandleEvent( EventPtr event )
|
||||||
|
|
||||||
case XW_PREFS_TIMERON_CHECKBOX_ID:
|
case XW_PREFS_TIMERON_CHECKBOX_ID:
|
||||||
XP_ASSERT( globals->isNewGame );
|
XP_ASSERT( globals->isNewGame );
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
|
||||||
case XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID:
|
|
||||||
#endif
|
|
||||||
form = FrmGetActiveForm();
|
form = FrmGetActiveForm();
|
||||||
showHidePrefsWidgets( globals, form );
|
showHidePrefsWidgets( globals, form );
|
||||||
break;
|
break;
|
||||||
|
@ -156,7 +153,7 @@ dropCtlUnlessNewGame( PalmAppGlobals* globals, XP_U16 id )
|
||||||
case XW_PREFS_TIMERON_CHECKBOX_ID:
|
case XW_PREFS_TIMERON_CHECKBOX_ID:
|
||||||
case XW_PREFS_TIMER_FIELD_ID:
|
case XW_PREFS_TIMER_FIELD_ID:
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
case XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID:
|
case XW_PREFS_PICKTILES_CHECKBOX_ID:
|
||||||
#endif
|
#endif
|
||||||
if ( globals->isNewGame ) {
|
if ( globals->isNewGame ) {
|
||||||
break;
|
break;
|
||||||
|
@ -198,7 +195,6 @@ GlobalPrefsToLocal( PalmAppGlobals* globals )
|
||||||
state->gameSeconds = globals->util.gameInfo->gameSeconds;
|
state->gameSeconds = globals->util.gameInfo->gameSeconds;
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
state->allowPickTiles = globals->util.gameInfo->allowPickTiles;
|
state->allowPickTiles = globals->util.gameInfo->allowPickTiles;
|
||||||
state->enablePickTiles = globals->util.gameInfo->enablePickTiles;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
state->stateTypeIsGlobal = globals->stateTypeIsGlobal;
|
state->stateTypeIsGlobal = globals->stateTypeIsGlobal;
|
||||||
|
@ -233,7 +229,6 @@ LocalPrefsToGlobal( PalmAppGlobals* globals )
|
||||||
|
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
globals->util.gameInfo->allowPickTiles = state->allowPickTiles;
|
globals->util.gameInfo->allowPickTiles = state->allowPickTiles;
|
||||||
globals->util.gameInfo->enablePickTiles = state->enablePickTiles;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return erase;
|
return erase;
|
||||||
|
@ -271,8 +266,6 @@ localPrefsToControls( PalmAppGlobals* globals, PrefsDlgState* state )
|
||||||
setBooleanCtrl( XW_PREFS_TIMERON_CHECKBOX_ID, state->timerEnabled );
|
setBooleanCtrl( XW_PREFS_TIMERON_CHECKBOX_ID, state->timerEnabled );
|
||||||
|
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
setBooleanCtrl( XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID,
|
|
||||||
state->enablePickTiles );
|
|
||||||
setBooleanCtrl( XW_PREFS_PICKTILES_CHECKBOX_ID, state->allowPickTiles );
|
setBooleanCtrl( XW_PREFS_PICKTILES_CHECKBOX_ID, state->allowPickTiles );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -313,8 +306,6 @@ controlsToLocalPrefs( PalmAppGlobals* globals, PrefsDlgState* state )
|
||||||
state->gameSeconds = fieldToNum( XW_PREFS_TIMER_FIELD_ID ) * 60;
|
state->gameSeconds = fieldToNum( XW_PREFS_TIMER_FIELD_ID ) * 60;
|
||||||
|
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
state->enablePickTiles =
|
|
||||||
getBooleanCtrl( XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID );
|
|
||||||
state->allowPickTiles =
|
state->allowPickTiles =
|
||||||
getBooleanCtrl( XW_PREFS_PICKTILES_CHECKBOX_ID );
|
getBooleanCtrl( XW_PREFS_PICKTILES_CHECKBOX_ID );
|
||||||
#endif
|
#endif
|
||||||
|
@ -373,10 +364,6 @@ showHidePrefsWidgets( PalmAppGlobals* globals, FormPtr form )
|
||||||
if ( !global ) {
|
if ( !global ) {
|
||||||
Boolean on = getBooleanCtrl( XW_PREFS_TIMERON_CHECKBOX_ID );
|
Boolean on = getBooleanCtrl( XW_PREFS_TIMERON_CHECKBOX_ID );
|
||||||
disOrEnable( form, XW_PREFS_TIMER_FIELD_ID, on );
|
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 */
|
} /* showHidePrefsWidgets */
|
||||||
|
|
||||||
|
|
|
@ -253,8 +253,7 @@
|
||||||
#define XW_PREFS_TIMERON_CHECKBOX_ID 2721
|
#define XW_PREFS_TIMERON_CHECKBOX_ID 2721
|
||||||
#define XW_PREFS_TIMER_FIELD_ID 2722
|
#define XW_PREFS_TIMER_FIELD_ID 2722
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
# define XW_PREFS_ENABLEPICKTILES_CHECKBOX_ID 2723
|
# define XW_PREFS_PICKTILES_CHECKBOX_ID 2723
|
||||||
# define XW_PREFS_PICKTILES_CHECKBOX_ID 2724
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* These aren't part of the hide/show thing as they're displayed only
|
/* These aren't part of the hide/show thing as they're displayed only
|
||||||
|
|
Loading…
Reference in a new issue