From: H.G.Muller Date: Sun, 22 Apr 2018 19:20:37 +0000 (+0200) Subject: Provide user interface for promotion drops X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=27319ed1c84ca0924c10da38f0d9885736fda221;p=xboard.git Provide user interface for promotion drops Pressing the Shift key during a drop move will attempt to drop the promoted version of the piece. --- diff --git a/backend.c b/backend.c index 2394fb6..9fe24ae 100644 --- a/backend.c +++ b/backend.c @@ -7234,6 +7234,7 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar) fromX = fromX ? WhitePawn : BlackPawn; // first piece type in selected holdings while(PieceToChar(fromX) == '.' || PieceToChar(fromX) == '+' || PieceToNumber(fromX) != fromY && fromX != (int) EmptySquare) fromX++; fromY = DROP_RANK; + if(autoProm[fromX] && shiftKey) fromX = CHUPROMOTED(fromX); } /* [HGM] always test for legality, to get promotion info */