xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XBoard-devel] Promotion and piece menus


From: h.g. muller
Subject: [XBoard-devel] Promotion and piece menus
Date: Thu, 07 Apr 2011 00:25:16 +0100

Today I had a great idea to eliminate promotion popup and
piece menu in Edit Position mode:

After clicking the relevant square (the to-square of a click-click
promotion move, or the right-clicked square where you want to
put a piece in Edit Position), you don't pop up anything, but simply
display a piece in that square. As long as the mouse button stays
down, you can then move the mouse to alter the identity of that
piece. When you see the piece you want, you release the button,
and voila! XBoard either executes a promotion to that piece,
or creates it there.

I just pushed two patches to hgm.nubati.net, popups branch,
which implement this. (For XBoard; for now it might break WinBoard).
One for the piece menu, one for the promotion popup.
It can be tested through

xboard -sweepPromotions true -pieceMenu false

(The options are persistent, so you have to specify them once.)

Currently the promotion popup still appears when you do a
drag-drop move. Not sure how to do the same there, as the
to-square is determined by an up-click, so there is no mouse
button down that you could use to select the piece.
An alternative way to use this is to basically always run in
"alwaysPromoteToQueen" mode for the drag-drop moves,
but do this on click-click moves, so that the rare under-promotion
can still be done even in this mode. Of course the order in which
the pieces occur is such that it starts with Queen; if the second
click is stationary you would not notice that you were not using
the traditional auto-Queening.

The current implementation cycles through all pieces defined
in the variant, (of your own color, of course), skipping Pawns and
royal pieces.

In Edit Position mode it works similar, except that you cycle
there through all (defined) pieces, of both colors, starting with
Pawn. The traditional difference between right and middle button
remains: one starts with a black Pawn, the other with a white one.
Changing side-to-move is done by clicking the clock, (as usual),
clear board is implemented by clicking the clock of the side
that already has the move. (I had to think of something...)
A stationary click on a square thus creates a Pawn of the
requested color there. To get another piece, you have to move
the mouse vertically.

Personally I think this works so well that it completely eliminates
the need for the menus. But I am curious what other people
think of it.

I think this works great



reply via email to

[Prev in Thread] Current Thread [Next in Thread]