char title[MSG_SIZ];
char buf[8000]; // comment can be long!
int score, depth;
-
- if( appData.autoDisplayComment ) {
- if (moveNumber < 0 || parseList[moveNumber][0] == NULLCHAR) {
- strcpy(title, "Comment");
- } else {
- sprintf(title, "Comment on %d.%s%s", moveNumber / 2 + 1,
- WhiteOnMove(moveNumber) ? " " : ".. ",
- parseList[moveNumber]);
- }
- // [HGM] PV info: display PV info together with (or as) comment
- if(moveNumber >= 0 && (depth = pvInfoList[moveNumber].depth) > 0) {
- if(text == NULL) text = "";
- score = pvInfoList[moveNumber].score;
- sprintf(buf, "%s%.2f/%d %d\n%s", score>0 ? "+" : "", score/100.,
- depth, (pvInfoList[moveNumber].time+50)/100, text);
- text = buf;
- }
- } else title[0] = 0;
-
- if (text != NULL)
+
+ if (moveNumber < 0 || parseList[moveNumber][0] == NULLCHAR) {
+ strcpy(title, "Comment");
+ } else {
+ sprintf(title, "Comment on %d.%s%s", moveNumber / 2 + 1,
+ WhiteOnMove(moveNumber) ? " " : ".. ",
+ parseList[moveNumber]);
+ }
+ // [HGM] PV info: display PV info together with (or as) comment
+ if(moveNumber >= 0 && (depth = pvInfoList[moveNumber].depth) > 0) {
+ if(text == NULL) text = "";
+ score = pvInfoList[moveNumber].score;
+ sprintf(buf, "%s%.2f/%d %d\n%s", score>0 ? "+" : "", score/100.,
+ depth, (pvInfoList[moveNumber].time+50)/100, text);
+ text = buf;
+ }
+ if (text != NULL && (appData.autoDisplayComment || commentUp))
CommentPopUp(title, text);
}
static int commentIndex;\r
static Boolean editComment = FALSE;\r
HWND commentDialog = NULL;\r
-BOOLEAN commentDialogUp = FALSE;\r
+int commentUp = FALSE;\r
static int commentX, commentY, commentH, commentW;\r
\r
static char *analysisTitle;\r
break;\r
\r
case IDM_EditComment:\r
- if (commentDialogUp && editComment) {\r
+ if (commentUp && editComment) {\r
CommentPopDown();\r
} else {\r
EditCommentEvent();\r
\r
if (commentDialog) {\r
SendMessage(commentDialog, WM_INITDIALOG, 0, 0);\r
- if (!commentDialogUp) ShowWindow(commentDialog, SW_SHOW);\r
+ if (!commentUp) ShowWindow(commentDialog, SW_SHOW);\r
} else {\r
lpProc = MakeProcInstance((FARPROC)CommentDialog, hInst);\r
CreateDialog(hInst, MAKEINTRESOURCE(DLG_EditComment),\r
hwndMain, (DLGPROC)lpProc);\r
FreeProcInstance(lpProc);\r
}\r
- commentDialogUp = TRUE;\r
+ commentUp = TRUE;\r
}\r
\r
\r
if (commentDialog) {\r
ShowWindow(commentDialog, SW_HIDE);\r
}\r
- commentDialogUp = FALSE;\r
+ commentUp = FALSE;\r
}\r
\r
VOID\r