From: H.G. Muller Date: Sat, 27 Nov 2010 13:38:14 +0000 (+0100) Subject: Fix Shogi promotion popup X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5b68a479424c23874371a9fae8ea0ecd1c0bf8e6;p=xboard.git Fix Shogi promotion popup The texts were adapted to shogi by printing new text items over the Queen and Knight buttons, but these did not alwys cover it. Now the text on the buttons is changed as it should be. Also the window title is adapted. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 08cafb9..f05e680 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -4307,12 +4307,11 @@ Promotion(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) ShowWindow(GetDlgItem(hDlg, PB_Bishop), gameInfo.variant != VariantShogi ? SW_SHOW : SW_HIDE); - ShowWindow(GetDlgItem(hDlg, IDC_Yes), - gameInfo.variant == VariantShogi ? - SW_SHOW : SW_HIDE); - ShowWindow(GetDlgItem(hDlg, IDC_No), - gameInfo.variant == VariantShogi ? - SW_SHOW : SW_HIDE); + if(gameInfo.variant == VariantShogi) { + SetDlgItemText(hDlg, PB_Queen, "YES"); + SetDlgItemText(hDlg, PB_Knight, "NO"); + SetWindowText(hDlg, "Promote?"); + } ShowWindow(GetDlgItem(hDlg, IDC_Centaur), gameInfo.variant == VariantSuper ? SW_SHOW : SW_HIDE); diff --git a/winboard/winboard.rc b/winboard/winboard.rc index b679327..2390a52 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -212,8 +212,6 @@ BEGIN PUSHBUTTON "K&night",PB_Knight,139,23,40,14,NOT WS_TABSTOP PUSHBUTTON "&King",PB_King,4,4,40,14,NOT WS_TABSTOP PUSHBUTTON "&Cancel",IDCANCEL,139,4,40,14,WS_GROUP - LTEXT " YES",IDC_Yes,6,25,36,10 - LTEXT " NO",IDC_No,141,25,36,10 LTEXT "C&entaur",IDC_Centaur,12,6,25,10 END