#include "config.h"\r
\r
#include <stdio.h>\r
+#include <string.h>\r
#include "common.h"\r
#include "backend.h"\r
+#include "backendz.h"\r
\r
int layoutList[2*MAX_OPTIONS];\r
int checkList[2*MAX_OPTIONS];\r
} else {\r
Option opt = cps->option[i];\r
switch(opt.type) {\r
+ case Slider:\r
case Spin:\r
fprintf(debugFP, "%20.20s [ +/-]", opt.name);\r
break;\r
case TextBox:\r
+ case FileName:\r
+ case PathName:\r
fprintf(debugFP, "%20.20s [______________________________________]", opt.name);\r
break;\r
case CheckBox:\r
case Button:\r
case SaveButton:\r
fprintf(debugFP, "[ %26.26s ]", opt.name);\r
+ case Message:\r
break;\r
}\r
}\r
void\r
LayoutOptions(int firstOption, int endOption, char *groupName, Option *optionList)\r
{\r
- int n, i, b = strlen(groupName), stop, prefix, right, nextOption, firstButton = buttons;\r
+ int i, b = strlen(groupName), stop, prefix, right, nextOption, firstButton = buttons;\r
Control lastType, nextType;\r
\r
nextOption = firstOption;\r
case SaveButton:\r
case Button: buttonList[buttons++] = nextOption; lastType = Button; break;\r
case TextBox:\r
+ case FileName:\r
+ case PathName:\r
+ case Slider:\r
case Spin: stop++;\r
+ case Message: ; // cannot happen\r
}\r
nextOption++;\r
}\r
while(k < cps->nrOptions) { // k steps through 'solitary' options\r
// look if we hit a group of options having names that start with the same word\r
int groupSize = 1, groupNameLength = 50;\r
- sscanf(cps->option[k].name, "%s", &buf); // get first word of option name\r
+ sscanf(cps->option[k].name, "%s", buf); // get first word of option name\r
while(k + groupSize < cps->nrOptions &&\r
strstr(cps->option[k+groupSize].name, buf) == cps->option[k+groupSize].name) {\r
int j;\r
break;\r
case Button:\r
case SaveButton:\r
+ default:\r
break;\r
}\r
}\r
// read out all controls, and if value is altered, remember it and send it to the engine\r
{\r
HANDLE hwndCombo;\r
- int i, k, new, changed;\r
+ int i, k, new=0, changed=0;\r
char **choices, newText[MSG_SIZ], buf[MSG_SIZ];\r
BOOL success;\r
\r
if(changed) cps->option[j].value = new;\r
break;\r
case Button:\r
+ default:\r
break; // are treated instantly, so they have been sent already\r
}\r
if(changed == 2) sprintf(buf, "option %s=%d\n", cps->option[j].name, new); else\r
\r
LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)\r
{\r
- static int * lpIndexFRC;\r
- BOOL index_is_ok;\r
char buf[MSG_SIZ];\r
int i, j;\r
\r
{\r
\r
switch(type) {\r
+ case Slider:\r
case Spin:\r
AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);\r
AddControl(x+95, y, 50, 11, 0x0081, ES_AUTOHSCROLL | ES_NUMBER | WS_BORDER | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);\r
case Button:\r
case SaveButton:\r
AddControl(x-2, y, 65, 13, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, i);\r
+ case Message:\r
break;\r
}\r
\r
\r
template.header.cdit = 0;\r
template.header.cx = 307;\r
- buttonRows = (buttons + 1 + 3)/4; // 4 per row, ronded up\r
+ buttonRows = (buttons + 1 + 3)/4; // 4 per row, rounded up\r
if(nr > 50) { \r
breakPoint = (nr+2*buttonRows+1)/2 & ~1;\r
template.header.cx = 625;\r
template.title[8] = cps == &first ? '1' : '2';\r
template.header.cy = y += 18*buttonRows+2;\r
template.header.style &= ~WS_VSCROLL;\r
- if(y > 300, 0) {\r
+#if 0\r
+ if(y > 300) {\r
template.header.cx = 295;\r
template.header.cy = 300;\r
template.header.style |= WS_VSCROLL;\r
}\r
+#endif\r
}\r
\r
void \r