mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
add checkbox for hint rect
This commit is contained in:
parent
8687d210b7
commit
aa5fad8385
3 changed files with 43 additions and 5 deletions
|
@ -65,16 +65,20 @@ adjustForChoice( HWND hDlg, CePrefsDlgState* state )
|
||||||
XP_U16 goesWithGlobal[] = {IDC_CHECKCOLORPLAYED, IDC_LEFTYCHECK,
|
XP_U16 goesWithGlobal[] = {IDC_CHECKCOLORPLAYED, IDC_LEFTYCHECK,
|
||||||
IDC_CHECKSHOWCURSOR, IDC_CHECKROBOTSCORES,
|
IDC_CHECKSHOWCURSOR, IDC_CHECKROBOTSCORES,
|
||||||
IDC_PREFCOLORS };
|
IDC_PREFCOLORS };
|
||||||
XP_U16 goesWithLocal[] = {IDC_CHECKSMARTROBOT,IDC_CHECKNOHINTS,
|
XP_U16 goesWithLocal[] = {IDC_CHECKSMARTROBOT, IDC_CHECKNOHINTS,
|
||||||
TIMER_CHECK, TIMER_EDIT, PHONIES_LABEL,
|
TIMER_CHECK, TIMER_EDIT, PHONIES_LABEL,
|
||||||
PHONIES_COMBO, IDC_PICKTILES };
|
PHONIES_COMBO, IDC_PICKTILES
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
,IDC_CHECKHINTSLIMITS
|
||||||
|
#endif
|
||||||
|
};
|
||||||
XP_U16 resID;
|
XP_U16 resID;
|
||||||
|
XP_Bool doGlobalPrefs = state->globals->doGlobalPrefs;
|
||||||
|
|
||||||
resID = state->globals->doGlobalPrefs?
|
resID = doGlobalPrefs? IDC_RADIOGLOBAL:IDC_RADIOLOCAL;
|
||||||
IDC_RADIOGLOBAL:IDC_RADIOLOCAL;
|
|
||||||
SendDlgItemMessage( hDlg, resID, BM_SETCHECK, BST_CHECKED, 0L );
|
SendDlgItemMessage( hDlg, resID, BM_SETCHECK, BST_CHECKED, 0L );
|
||||||
|
|
||||||
if ( state->globals->doGlobalPrefs ) {
|
if ( doGlobalPrefs ) {
|
||||||
turnOnOff( hDlg, goesWithLocal,
|
turnOnOff( hDlg, goesWithLocal,
|
||||||
sizeof(goesWithLocal)/sizeof(goesWithLocal[0]),
|
sizeof(goesWithLocal)/sizeof(goesWithLocal[0]),
|
||||||
XP_FALSE );
|
XP_FALSE );
|
||||||
|
@ -89,6 +93,13 @@ adjustForChoice( HWND hDlg, CePrefsDlgState* state )
|
||||||
sizeof(goesWithLocal)/sizeof(goesWithLocal[0]),
|
sizeof(goesWithLocal)/sizeof(goesWithLocal[0]),
|
||||||
XP_TRUE);
|
XP_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
if ( !doGlobalPrefs ) {
|
||||||
|
ceShowOrHide( hDlg, IDC_CHECKHINTSLIMITS,
|
||||||
|
!ceGetChecked( hDlg, IDC_CHECKNOHINTS) );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
} /* adjustForChoice */
|
} /* adjustForChoice */
|
||||||
|
|
||||||
/* Copy global state into a local copy that can be changed without
|
/* Copy global state into a local copy that can be changed without
|
||||||
|
@ -105,6 +116,9 @@ loadStateFromCurPrefs( const CEAppPrefs* appPrefs, const CurGameInfo* gi,
|
||||||
prefsPrefs->gp.phoniesAction = gi->phoniesAction;
|
prefsPrefs->gp.phoniesAction = gi->phoniesAction;
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
prefsPrefs->gp.allowPickTiles = gi->allowPickTiles;
|
prefsPrefs->gp.allowPickTiles = gi->allowPickTiles;
|
||||||
|
#endif
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
prefsPrefs->gp.allowHintRect = gi->allowHintRect;
|
||||||
#endif
|
#endif
|
||||||
prefsPrefs->showColors = appPrefs->showColors;
|
prefsPrefs->showColors = appPrefs->showColors;
|
||||||
|
|
||||||
|
@ -124,6 +138,9 @@ loadCurPrefsFromState( CEAppPrefs* appPrefs, CurGameInfo* gi,
|
||||||
gi->phoniesAction = prefsPrefs->gp.phoniesAction;
|
gi->phoniesAction = prefsPrefs->gp.phoniesAction;
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
gi->allowPickTiles = prefsPrefs->gp.allowPickTiles;
|
gi->allowPickTiles = prefsPrefs->gp.allowPickTiles;
|
||||||
|
#endif
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
gi->allowHintRect = prefsPrefs->gp.allowHintRect;
|
||||||
#endif
|
#endif
|
||||||
appPrefs->showColors = prefsPrefs->showColors;
|
appPrefs->showColors = prefsPrefs->showColors;
|
||||||
|
|
||||||
|
@ -150,6 +167,9 @@ loadControlsFromState( HWND hDlg, CePrefsDlgState* pState )
|
||||||
|
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
ceSetChecked( hDlg, IDC_PICKTILES, prefsPrefs->gp.allowPickTiles );
|
ceSetChecked( hDlg, IDC_PICKTILES, prefsPrefs->gp.allowPickTiles );
|
||||||
|
#endif
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
ceSetChecked( hDlg, IDC_CHECKHINTSLIMITS, prefsPrefs->gp.allowHintRect );
|
||||||
#endif
|
#endif
|
||||||
/* timer */
|
/* timer */
|
||||||
sprintf( numBuf, "%d", prefsPrefs->gp.gameSeconds / 60 );
|
sprintf( numBuf, "%d", prefsPrefs->gp.gameSeconds / 60 );
|
||||||
|
@ -208,6 +228,9 @@ ceControlsToPrefs( HWND hDlg, CePrefsPrefs* prefsPrefs )
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
prefsPrefs->gp.allowPickTiles = ceGetChecked( hDlg, IDC_PICKTILES );
|
prefsPrefs->gp.allowPickTiles = ceGetChecked( hDlg, IDC_PICKTILES );
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
prefsPrefs->gp.allowHintRect = ceGetChecked( hDlg, IDC_CHECKHINTSLIMITS );
|
||||||
|
#endif
|
||||||
} /* ceControlsToPrefs */
|
} /* ceControlsToPrefs */
|
||||||
|
|
||||||
LRESULT CALLBACK
|
LRESULT CALLBACK
|
||||||
|
@ -256,6 +279,14 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
ceDoColorsEdit( hDlg, pState->globals,
|
ceDoColorsEdit( hDlg, pState->globals,
|
||||||
pState->prefsPrefs.colors );
|
pState->prefsPrefs.colors );
|
||||||
break;
|
break;
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
case IDC_CHECKNOHINTS:
|
||||||
|
timerOn = SendDlgItemMessage( hDlg, IDC_CHECKNOHINTS,
|
||||||
|
BM_GETCHECK, 0, 0 );
|
||||||
|
ceShowOrHide( hDlg, IDC_CHECKHINTSLIMITS, !timerOn );
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case IDOK:
|
case IDOK:
|
||||||
ceControlsToPrefs( hDlg, &pState->prefsPrefs );
|
ceControlsToPrefs( hDlg, &pState->prefsPrefs );
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
|
|
|
@ -31,6 +31,10 @@ typedef struct CeGamePrefs {
|
||||||
#ifdef FEATURE_TRAY_EDIT
|
#ifdef FEATURE_TRAY_EDIT
|
||||||
XP_Bool allowPickTiles;
|
XP_Bool allowPickTiles;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
XP_Bool allowHintRect;
|
||||||
|
#endif
|
||||||
|
|
||||||
XWPhoniesChoice phoniesAction;
|
XWPhoniesChoice phoniesAction;
|
||||||
/* phonies something */
|
/* phonies something */
|
||||||
} CeGamePrefs;
|
} CeGamePrefs;
|
||||||
|
|
|
@ -86,6 +86,9 @@
|
||||||
# define IDC_PICKALL 1054
|
# define IDC_PICKALL 1054
|
||||||
# define IDC_BACKUP 1055
|
# define IDC_BACKUP 1055
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XWFEATURE_SEARCHLIMIT
|
||||||
|
# define IDC_CHECKHINTSLIMITS 1056
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DLBLTR_BUTTON 1056
|
#define DLBLTR_BUTTON 1056
|
||||||
#define DBLWRD_BUTTON 1057
|
#define DBLWRD_BUTTON 1057
|
||||||
|
|
Loading…
Add table
Reference in a new issue