No longer print it in the comment window.
char *text;
{
char title[MSG_SIZ];
- char buf[8000]; // comment can be long!
- int score, depth;
if (moveNumber < 0 || parseList[moveNumber][0] == NULLCHAR) {
safeStrCpy(title, "Comment", sizeof(title)/sizeof(title[0]));
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;
- snprintf(buf,sizeof(buf)/sizeof(buf[0]), "%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);
}
return score;
}
+char* MakeEvalTitle( char * title)
+{
+ int score = currPvInfo[ currCurrent ].score;
+ int depth = currPvInfo[ currCurrent ].depth;
+ static char buf[MSG_SIZ];
+
+ if( depth <=0 ) return title;
+ if( currCurrent & 1 ) score = -score; /* Flip score for black */
+ snprintf(buf, MSG_SIZ, "%s {%s%.2f/%-2d %d}", title, score>0 ? "+" : " ", score/100., depth, (currPvInfo[currCurrent].time+50)/100);
+
+ return buf;
+}
+
// back-end
/*
For a centipawn value, this function returns the height of the corresponding
// calls of front-end part into back-end part
extern int GetMoveIndexFromPoint( int x, int y );
extern void PaintEvalGraph( void );
+extern char *MakeEvalTitle( char *title );
\r
// back-end painting; calls back front-end primitives for lines, rectangles and text\r
PaintEvalGraph();\r
+ SetWindowText(hWnd, MakeEvalTitle(T_("Evaluation Graph")));\r
\r
/* Copy bitmap into destination DC */\r
BitBlt( hDC, 0, 0, nWidthPB, nHeightPB, hdcPB, 0, 0, SRCCOPY );\r
Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle
Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle
+static char *title = N_("Evaluation graph");
//extern WindowPlacement wpEvalGraph;
// back-end painting; calls back front-end primitives for lines, rectangles and text
PaintEvalGraph();
+ XtSetArg(args[0], XtNtitle, MakeEvalTitle(_(title))); j++;
+ XtSetValues(evalGraphShell, args, 1);
XSync(yDisplay, False);
}
Arg args[16];
int j;
static int needInit = TRUE;
- static char *title = N_("Evaluation graph");
if (evalGraphShell == NULL) {