add pick-tiles checkbox

This commit is contained in:
ehouse 2003-12-09 05:20:10 +00:00
parent a2d627e970
commit bdf8ad0932
3 changed files with 25 additions and 4 deletions

View file

@ -65,7 +65,7 @@ adjustForChoice( HWND hDlg, PrefsDlgState* state )
IDC_CHECKSHOWCURSOR, IDC_CHECKROBOTSCORES};
XP_U16 goesWithLocal[] = {IDC_CHECKSMARTROBOT,IDC_CHECKNOHINTS,
TIMER_CHECK, TIMER_EDIT, PHONIES_LABEL,
PHONIES_COMBO };
PHONIES_COMBO, IDC_PICKTILES };
XP_U16 resID;
resID = state->globals->doGlobalPrefs?
@ -101,7 +101,9 @@ loadStateFromCurPrefs( const CEAppPrefs* appPrefs, const CurGameInfo* gi,
prefsPrefs->gp.timerEnabled = gi->timerEnabled;
prefsPrefs->gp.gameSeconds = gi->gameSeconds;
prefsPrefs->gp.phoniesAction = gi->phoniesAction;
#ifdef FEATURE_TRAY_EDIT
prefsPrefs->gp.allowPickTiles = gi->allowPickTiles;
#endif
prefsPrefs->showColors = appPrefs->showColors;
XP_MEMCPY( &prefsPrefs->cp, &appPrefs->cp, sizeof(prefsPrefs->cp) );
@ -116,7 +118,9 @@ loadCurPrefsFromState( CEAppPrefs* appPrefs, CurGameInfo* gi,
gi->timerEnabled = prefsPrefs->gp.timerEnabled;
gi->gameSeconds = prefsPrefs->gp.gameSeconds;
gi->phoniesAction = prefsPrefs->gp.phoniesAction;
#ifdef FEATURE_TRAY_EDIT
gi->allowPickTiles = prefsPrefs->gp.allowPickTiles;
#endif
appPrefs->showColors = prefsPrefs->showColors;
XP_MEMCPY( &appPrefs->cp, &prefsPrefs->cp, sizeof(appPrefs->cp) );
@ -138,6 +142,9 @@ loadControlsFromState( HWND hDlg, PrefsDlgState* pState )
ceSetChecked( hDlg, IDC_CHECKSHOWCURSOR, prefsPrefs->cp.showBoardArrow );
ceSetChecked( hDlg, IDC_CHECKROBOTSCORES, prefsPrefs->cp.showRobotScores );
#ifdef FEATURE_TRAY_EDIT
ceSetChecked( hDlg, IDC_PICKTILES, prefsPrefs->gp.allowPickTiles );
#endif
/* timer */
sprintf( numBuf, "%d", prefsPrefs->gp.gameSeconds / 60 );
ceSetDlgItemText( hDlg, TIMER_EDIT, numBuf );
@ -148,6 +155,9 @@ loadControlsFromState( HWND hDlg, PrefsDlgState* pState )
if ( !pState->isNewGame ) {
SendDlgItemMessage( hDlg, IDC_CHECKNOHINTS, WM_ENABLE, FALSE, 0L );
#ifdef FEATURE_TRAY_EDIT
SendDlgItemMessage( hDlg, IDC_PICKTILES, WM_ENABLE, FALSE, 0L );
#endif
}
} /* loadControlsFromState */
@ -172,6 +182,9 @@ ceControlsToPrefs( HWND hDlg, PrefsPrefs* prefsPrefs )
prefsPrefs->cp.showBoardArrow = ceGetChecked( hDlg, IDC_CHECKSHOWCURSOR );
prefsPrefs->cp.showRobotScores = ceGetChecked( hDlg, IDC_CHECKROBOTSCORES );
#ifdef FEATURE_TRAY_EDIT
prefsPrefs->gp.allowPickTiles = ceGetChecked( hDlg, IDC_PICKTILES );
#endif
} /* ceControlsToPrefs */
LRESULT CALLBACK

View file

@ -28,6 +28,9 @@ typedef struct CeGamePrefs {
XP_Bool hintsNotAllowed;
XP_U8 robotSmartness;
XP_Bool timerEnabled;
#ifdef FEATURE_TRAY_EDIT
XP_Bool allowPickTiles;
#endif
XWPhoniesChoice phoniesAction;
/* phonies something */
} CeGamePrefs;

View file

@ -73,6 +73,11 @@
#define IDC_LOCALP_LABEL 1046
#define IDC_TOTAL_LABEL 1047
#define IDC_REMOTE_LABEL 1048
#define IDC_PICKTILES 1049
#define IDC_PICKALL 1050
#define IDC_BPICK 1051
#define IDC_CPICK 1052
#define IDC_PICKMSG 1053
#define IDM_FILE_EXIT 40002
#define IDM_HELP_ABOUT 40003
@ -105,7 +110,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 122
#define _APS_NEXT_COMMAND_VALUE 40023
#define _APS_NEXT_CONTROL_VALUE 1049
#define _APS_NEXT_CONTROL_VALUE 1054
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif