From bdf8ad0932543c56c456c357f15d339d67a46e08 Mon Sep 17 00:00:00 2001 From: ehouse Date: Tue, 9 Dec 2003 05:20:10 +0000 Subject: [PATCH] add pick-tiles checkbox --- xwords4/wince/ceprefs.c | 19 ++++++++++++++++--- xwords4/wince/ceprefs.h | 3 +++ xwords4/wince/resource.h | 7 ++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/xwords4/wince/ceprefs.c b/xwords4/wince/ceprefs.c index 93b8d2ff4..e795eb6b5 100755 --- a/xwords4/wince/ceprefs.c +++ b/xwords4/wince/ceprefs.c @@ -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 diff --git a/xwords4/wince/ceprefs.h b/xwords4/wince/ceprefs.h index b5fb11890..642531923 100755 --- a/xwords4/wince/ceprefs.h +++ b/xwords4/wince/ceprefs.h @@ -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; diff --git a/xwords4/wince/resource.h b/xwords4/wince/resource.h index e86a1e8e3..77ca60c95 100755 --- a/xwords4/wince/resource.h +++ b/xwords4/wince/resource.h @@ -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