X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=1a94cf7a441d1232dfc0a11f46f12938c2f9a85d;hb=fd6c0a862ee5d94985882179902b95d8f66a3c1b;hp=34b4c36dda644fda8bf6c5c61f22fd9c688bc89c;hpb=3aadc726d957f0e8cdeae3c65ff19808a979a4e3;p=xboard.git diff --git a/backend.c b/backend.c index 34b4c36..1a94cf7 100644 --- a/backend.c +++ b/backend.c @@ -6099,8 +6099,10 @@ UserMoveEvent(fromX, fromY, toX, toY, promoChar) void PromoDialog(int h, int w, Board board, Boolean clearBoard) { // dummy routine to mimic with pseudo-popup what front-end should do: - // display a popup with h x w mini-board - int i, j; + // display a popup with h x w mini-board, and divert any mouse clicks + // on it to the back-end routines RightClick and LeftClick, just + // like the mouse event hadler of the board widget does now. + // (Note it would have to off-set x if holdings are displayed!) DisplayMessage("Click on your piece of choice", ""); DrawPosition(TRUE, board); } @@ -6110,7 +6112,32 @@ int wTab[(int)EmptySquare/2+1] = { 1,1,2,3,4,5,3,7,4,3,5,4,4,5,7,5,4,6,6,5,5,7,6 Board promoBoard; int promotionChoice = 0; -void PromoPopUp(ChessSquare piece) +void +PiecePopUp() +{ + int i, j, h, w, nWhite=0, nBlack=0; + ChessSquare list[EmptySquare]; + for(i=0; iBOARD_RGHT-BOARD_LEFT) { w = BOARD_RGHT - BOARD_LEFT; h = (j+w-1)/w; } + for(i=0; i