Lots of little tweaks to dialog item locations. Also, don't make

phonies combo/list box sorted since that screws up order of choices.
This commit is contained in:
ehouse 2008-12-01 13:19:14 +00:00
parent f4ab972e03
commit d6cb58f9cd
3 changed files with 46 additions and 45 deletions

View file

@ -34,16 +34,16 @@ stuffPhoniesList( CePrefsDlgState* state )
{
HWND hDlg = state->dlgHdr.hDlg;
CEAppGlobals* globals = state->dlgHdr.globals;
XP_U16 i;
XP_U16 ii;
wchar_t* strings[] = {
L"Ignore",
L"Warn",
L"Disallow"
};
for ( i = 0; i < 3; ++i ) {
for ( ii = 0; ii < 3; ++ii ) {
SendDlgItemMessage( hDlg, state->phonComboId,
ADDSTRING(globals), 0, (long)strings[i] );
ADDSTRING(globals), ii, (long)strings[ii] );
}
} /* stuffPhoniesList */
@ -78,7 +78,7 @@ adjustForChoice( CePrefsDlgState* state )
#endif
};
XP_U16 goesWithLocal[] = {IDC_CHECKSMARTROBOT, IDC_CHECKNOHINTS,
XP_U16 goesWithLocal[] = {IDC_CHECKSMARTROBOT, IDC_CHECKHINTSOK,
TIMER_CHECK, TIMER_EDIT, PHONIES_LABEL,
PHONIES_COMBO, IDC_PHONIESUPDOWN,
PHONIES_COMBO_PPC,
@ -107,7 +107,7 @@ adjustForChoice( CePrefsDlgState* state )
setTimerCtls( hDlg, ceGetChecked( hDlg, TIMER_CHECK ) );
#ifdef XWFEATURE_SEARCHLIMIT
ceShowOrHide( hDlg, IDC_CHECKHINTSLIMITS,
!ceGetChecked( hDlg, IDC_CHECKNOHINTS) );
ceGetChecked( hDlg, IDC_CHECKHINTSOK) );
#endif
ceDlgComboShowHide( &state->dlgHdr, PHONIES_COMBO );
}
@ -191,7 +191,7 @@ loadControlsFromState( CePrefsDlgState* pState )
ceSetChecked( hDlg, IDC_CHECKCOLORPLAYED, prefsPrefs->showColors );
ceSetChecked( hDlg, IDC_CHECKSMARTROBOT,
prefsPrefs->gp.robotSmartness > 0 );
ceSetChecked( hDlg, IDC_CHECKNOHINTS, prefsPrefs->gp.hintsNotAllowed );
ceSetChecked( hDlg, IDC_CHECKHINTSOK, !prefsPrefs->gp.hintsNotAllowed );
ceSetChecked( hDlg, IDC_CHECKSHOWCURSOR, prefsPrefs->cp.showBoardArrow );
ceSetChecked( hDlg, IDC_CHECKROBOTSCORES, prefsPrefs->cp.showRobotScores );
@ -209,7 +209,7 @@ loadControlsFromState( CePrefsDlgState* pState )
prefsPrefs->gp.phoniesAction, 0L );
if ( !pState->isNewGame ) {
XP_U16 unavail[] = { TIMER_CHECK, TIMER_EDIT, IDC_CHECKNOHINTS
XP_U16 unavail[] = { TIMER_CHECK, TIMER_EDIT, IDC_CHECKHINTSOK
#ifdef FEATURE_TRAY_EDIT
,IDC_PICKTILES
#endif
@ -234,7 +234,7 @@ ceControlsToPrefs( CePrefsDlgState* state )
prefsPrefs->showColors = ceGetChecked( hDlg, IDC_CHECKCOLORPLAYED );
prefsPrefs->gp.robotSmartness
= ceGetChecked( hDlg, IDC_CHECKSMARTROBOT ) ? 1 : 0;
prefsPrefs->gp.hintsNotAllowed = ceGetChecked( hDlg, IDC_CHECKNOHINTS );
prefsPrefs->gp.hintsNotAllowed = !ceGetChecked( hDlg, IDC_CHECKHINTSOK );
selIndex = (XP_U16)SendDlgItemMessage( hDlg, state->phonComboId,
GETCURSEL(state->dlgHdr.globals),
@ -319,10 +319,10 @@ PrefsDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
#endif
#ifdef XWFEATURE_SEARCHLIMIT
case IDC_CHECKNOHINTS:
timerOn = SendDlgItemMessage( hDlg, IDC_CHECKNOHINTS,
case IDC_CHECKHINTSOK:
timerOn = SendDlgItemMessage( hDlg, IDC_CHECKHINTSOK,
BM_GETCHECK, 0, 0 );
ceShowOrHide( hDlg, IDC_CHECKHINTSLIMITS, !timerOn );
ceShowOrHide( hDlg, IDC_CHECKHINTSLIMITS, timerOn );
break;
#endif

View file

@ -66,7 +66,7 @@
#define IDC_LEFTYCHECK 1038
#define IDC_CHECKCOLORPLAYED 1039
#define IDC_CHECKSMARTROBOT 1040
#define IDC_CHECKNOHINTS 1041
#define IDC_CHECKHINTSOK 1041
#define IDC_CHECKSHOWCURSOR 1042
#define IDC_CHECKROBOTSCORES 1043
#define IDC_PREFCOLORS 1044

View file

@ -93,7 +93,7 @@ BEGIN
MENUITEM "Next hint", ID_MOVE_NEXTHINT
MENUITEM "Hint", ID_MOVE_HINT
#ifdef XWFEATURE_SEARCHLIMIT
MENUITEM "Limited hint", ID_MOVE_LIMITEDHINT
MENUITEM "Limited hint...", ID_MOVE_LIMITEDHINT
#endif
MENUITEM SEPARATOR
MENUITEM "Show values", ID_MOVE_VALUES
@ -165,7 +165,7 @@ END
# define UDS_EXPANDABLE 0x0200
# define UDS_NOSCROLL 0x0400
# define LISTBOX_CONTROL_FLAGS \
NOT LBS_NOTIFY | LBS_SORT | LBS_NOINTEGRALHEIGHT | NOT WS_BORDER | WS_TABSTOP
NOT LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | NOT WS_BORDER | WS_TABSTOP
# define SPINNER_CONTROL_FLAGS \
UDS_AUTOBUDDY | UDS_HORZ | UDS_ALIGNRIGHT | UDS_ARROWKEYS |\
UDS_SETBUDDYINT | UDS_EXPANDABLE
@ -191,12 +191,13 @@ END
# define ROW_SPACE 15
# define ROW_SPACE_PL ROW_SPACE
#endif
#define GAME_NAME_WIDTH 60
#define CHECK_WIDTH 10
#define GAME_NAME_WIDTH 56
#define LEFT_COL 2
#ifdef XWFEATURE_STANDALONE_ONLY
# define GAME_NAME_LEFT LEFT_COL
# define GAME_ROBOT_LEFT 66
# define GAME_PWD_LEFT 80
# define GAME_ROBOT_LEFT (GAME_NAME_LEFT + GAME_NAME_WIDTH + 5)
# define GAME_PWD_LEFT (GAME_ROBOT_LEFT + 15)
# define NPLAYERS_ROW 3
# define GAME_NAMELABEL_LEFT GAME_NAME_LEFT
# define GAME_ROBOTLABEL_LEFT GAME_ROBOT_LEFT
@ -207,14 +208,14 @@ END
# define GAME_REMOTE_LEFT 2
# define GAME_NAME_LEFT 15
# define GAME_ROBOT_LEFT 92
# define GAME_PWD_LEFT 110
# define GAME_PWD_LEFT (GAME_ROBOT_LEFT + CHECK_WIDTH + 6)
# define GAME_NAMELABEL_LEFT (GAME_NAME_LEFT + 20)
# define GAME_ROBOTLABEL_LEFT 87
# define GAME_PWDLABEL_LEFT 105
#endif
#define LABELS_ROW (NPLAYERS_ROW+ROW_SPACE+3)
#define LABELS_ROW (NPLAYERS_ROW+ROW_SPACE)
#define PLAYER_ROW_1 (LABELS_ROW+ROW_SPACE_PL)
#define PLAYER_ROW_2 (PLAYER_ROW_1+ROW_SPACE_PL)
#define PLAYER_ROW_3 (PLAYER_ROW_2+ROW_SPACE_PL)
@ -231,7 +232,6 @@ END
# define GAMEINFO_HEIGHT (BUTTONS_ROW + BUTTON_HT + 4)
#endif
#define CHECK_WIDTH 10
/* in commctrl.h, but including isn't enough */
#undef UPDOWN_CLASS
@ -260,18 +260,18 @@ BEGIN
LTEXT "",IDC_TOTAL_LABEL,LEFT_COL,NPLAYERS_ROW,43,8
#ifdef _WIN32_WCE
LISTBOX IDC_NPLAYERSCOMBO, 46, NPLAYERS_ROW, 24, 12,LISTBOX_CONTROL_FLAGS
LISTBOX IDC_NPLAYERSCOMBO, 46, NPLAYERS_ROW, 24, ROW_HEIGHT, LISTBOX_CONTROL_FLAGS
CONTROL "", IDC_NPLAYERSUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
COMBOBOX IDC_NPLAYERSCOMBO_PPC,46,NPLAYERS_ROW,24,58,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Jugl.",GIJUGGLE_BUTTON,75,NPLAYERS_ROW,20,12
PUSHBUTTON "Jugl.",GIJUGGLE_BUTTON,75,NPLAYERS_ROW,20,ROW_HEIGHT
LTEXT "Name",IDC_STATIC,GAME_NAMELABEL_LEFT,
LABELS_ROW,19,8,SS_NOPREFIX
LTEXT "Robot",IDC_STATIC,GAME_ROBOTLABEL_LEFT-7,LABELS_ROW,20,8
LABELS_ROW,GAME_NAME_WIDTH-10,8,SS_NOPREFIX
LTEXT "Robot",IDC_STATIC,GAME_ROBOTLABEL_LEFT-7,LABELS_ROW,22,8
LTEXT "Pwd",IDC_STATIC,GAME_PWDLABEL_LEFT,LABELS_ROW,16,8
#if defined XWFEATURE_RELAY || defined XWFEATURE_BLUETOOTH
@ -293,11 +293,11 @@ BEGIN
LTEXT "Dictionary:",IDC_DICTLABEL,LEFT_COL,DICTPICK_LAB_ROW,36,8,
SS_NOPREFIX
#ifdef _WIN32_WCE
LISTBOX IDC_DICTLIST, LEFT_COL+10,DICTPICK_ROW,70,12,LISTBOX_CONTROL_FLAGS
LISTBOX IDC_DICTLIST, LEFT_COL+10,DICTPICK_ROW,80,ROW_HEIGHT,LISTBOX_CONTROL_FLAGS|LBS_SORT
CONTROL "", IDC_DICTUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
COMBOBOX IDC_DICTLIST_PPC,LEFT_COL+10,DICTPICK_ROW,70,58,
COMBOBOX IDC_DICTLIST_PPC,LEFT_COL+10,DICTPICK_ROW,80,58,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Preferences...",OPTIONS_BUTTON,LEFT_COL,PREFS_ROW,55,12
@ -368,7 +368,7 @@ BEGIN
#ifdef _WIN32_WCE
LISTBOX BLANKFACE_LIST,ASKB_COMBOLEFT,ASKB_COLLEFT,25,12,
LISTBOX_CONTROL_FLAGS
LISTBOX_CONTROL_FLAGS | LBS_SORT
CONTROL "", IDC_ASKBLANK_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
@ -411,8 +411,8 @@ END
#define SVGM_LEFT_COL 2
#define SVGM_ROW_1 2
#define SVGM_ROW_2 (SVGM_ROW_1+35)
#define SVGM_ROW_3 (SVGM_ROW_2+16)
#define SVGM_ROW_4 (SVGM_ROW_3+20)
#define SVGM_ROW_3 (SVGM_ROW_2+13)
#define SVGM_ROW_4 (SVGM_ROW_3+19)
#ifdef _WIN32_WCE
/* # define SVGM_DLG_HT (SVGM_ROW_3) */
# define SVGM_DLG_HT (SVGM_ROW_4+16)
@ -433,7 +433,8 @@ BEGIN
IDC_SVGM_SELLAB,SVGM_LEFT_COL,
SVGM_ROW_1,90,35
#ifdef _WIN32_WCE
LISTBOX IDC_SVGM_GAMELIST, SVGM_LEFT_COL,SVGM_ROW_2,70,12,LISTBOX_CONTROL_FLAGS
LISTBOX IDC_SVGM_GAMELIST, SVGM_LEFT_COL,SVGM_ROW_2,70,ROW_HEIGHT,
LISTBOX_CONTROL_FLAGS | LBS_SORT
CONTROL "", IDC_SVGM_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
@ -499,18 +500,18 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | DS_CENTER
CAPTION "Tile hint limits"
FONT 8, "System"
BEGIN
LTEXT "Use at least:",IDC_STATIC,HC_LABELS_COL,HC_MINROW,60,8
LTEXT "Use at least:",IDC_STATIC,HC_LABELS_COL,HC_MINROW,60,ROW_HEIGHT
#ifdef _WIN32_WCE
LISTBOX HC_MIN_COMBO, HC_DROPDOWNS_COL,HC_MINROW, 24, 12, LISTBOX_CONTROL_FLAGS
LISTBOX HC_MIN_COMBO, HC_DROPDOWNS_COL,HC_MINROW, 24, ROW_HEIGHT, LISTBOX_CONTROL_FLAGS
CONTROL "", HC_MIN_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
COMBOBOX HC_MIN_COMBO_PPC,HC_DROPDOWNS_COL,HC_MINROW,17,58,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "But no more than:",IDC_STATIC,HC_LABELS_COL,HC_MAXROW,60,8
LTEXT "But no more than:",IDC_STATIC,HC_LABELS_COL,HC_MAXROW,60,ROW_HEIGHT
#ifdef _WIN32_WCE
LISTBOX HC_MAX_COMBO, HC_DROPDOWNS_COL,HC_MAXROW, 24, 12, LISTBOX_CONTROL_FLAGS
LISTBOX HC_MAX_COMBO, HC_DROPDOWNS_COL,HC_MAXROW, 24, ROW_HEIGHT, LISTBOX_CONTROL_FLAGS
CONTROL "", HC_MAX_UPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
@ -557,12 +558,12 @@ BEGIN
/* Global */
CONTROL "Color played tiles",IDC_CHECKCOLORPLAYED,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP | WS_GROUP,8,PR_ROW2,90,
PREFS_ROW_HT
BS_AUTOCHECKBOX | WS_TABSTOP | WS_GROUP,
8,PR_ROW2,80,PREFS_ROW_HT
CONTROL "Enable cursor",IDC_CHECKSHOWCURSOR,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW3,90,PREFS_ROW_HT
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW3,80,PREFS_ROW_HT
CONTROL "Explain robot scores",IDC_CHECKROBOTSCORES,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW4,90,PREFS_ROW_HT
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW4,80,PREFS_ROW_HT
PUSHBUTTON "Edit colors...",IDC_PREFCOLORS,8,PR_ROW5,60,12
#ifdef ALLOW_CHOOSE_FONTS
PUSHBUTTON "Choose font...",IDC_PREFFONTS,8,PR_ROW6,60,12
@ -570,20 +571,20 @@ BEGIN
/* Per game */
CONTROL "Smart robot",IDC_CHECKSMARTROBOT,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP | WS_GROUP,8,PR_ROW2,90,
BS_AUTOCHECKBOX | WS_TABSTOP | WS_GROUP,8,PR_ROW2,60,
PREFS_ROW_HT
CONTROL "Disallow hints",IDC_CHECKNOHINTS,"Button",
CONTROL "Allow hints",IDC_CHECKHINTSOK,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW3,60,PREFS_ROW_HT
#ifdef XWFEATURE_SEARCHLIMIT
CONTROL "Hint limits",IDC_CHECKHINTSLIMITS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8+10,PR_ROW4-2,50,10
#endif
CONTROL "Timer on (minutes)",TIMER_CHECK,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW5,70,PREFS_ROW_HT
EDITTEXT TIMER_EDIT,80,PR_ROW5,16,12,ES_AUTOHSCROLL | ES_NUMBER
BS_AUTOCHECKBOX | WS_TABSTOP,8,PR_ROW5,75,PREFS_ROW_HT
EDITTEXT TIMER_EDIT,85,PR_ROW5,16,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Phonies:",PHONIES_LABEL,8,PR_ROW6,28,PREFS_ROW_HT
#ifdef _WIN32_WCE
LISTBOX PHONIES_COMBO, 38,PR_ROW6,50,12, LISTBOX_CONTROL_FLAGS
LISTBOX PHONIES_COMBO, 38,PR_ROW6,50,PREFS_ROW_HT, LISTBOX_CONTROL_FLAGS
CONTROL "", IDC_PHONIESUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
@ -818,7 +819,7 @@ BEGIN
LTEXT "Fonts:",FONTS_LABEL,5,2,25,12
#ifdef _WIN32_WCE
LISTBOX FONTS_COMBO, 30,2,70,12, LISTBOX_CONTROL_FLAGS
LISTBOX FONTS_COMBO, 30,2,70,12, LISTBOX_CONTROL_FLAGS | LBS_SORT
CONTROL "", IDC_FONTSUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif
@ -827,7 +828,7 @@ BEGIN
LTEXT "Size:",FONTSIZE_LABEL,5,16,25,12
#ifdef _WIN32_WCE
LISTBOX FONTSIZE_COMBO, 30,16,25,12, LISTBOX_CONTROL_FLAGS
LISTBOX FONTSIZE_COMBO, 30,16,25,12, LISTBOX_CONTROL_FLAGS | LBS_SORT
CONTROL "", IDC_FONTSIZEUPDOWN, UPDOWN_CLASS, SPINNER_CONTROL_FLAGS,
0, 0, 0, 0
#endif