{ "dropMenu", ArgBoolean, (void *) &appData.dropMenu, TRUE, (ArgIniType) FALSE },
{ "pieceMenu", ArgBoolean, (void *) &appData.pieceMenu, TRUE, (ArgIniType) TRUE },
{ "sweepPromotions", ArgBoolean, (void *) &appData.sweepSelect, TRUE, (ArgIniType) FALSE },
+ { "monoMouse", ArgBoolean, (void *) &appData.monoMouse, XBOARD, (ArgIniType) FALSE },
{ "remoteShell", ArgFilename, (void *) &appData.remoteShell, FALSE, (ArgIniType) REMOTE_SHELL },
{ "rsh", ArgFilename, (void *) &appData.remoteShell, FALSE, INVALID },
{ "remoteUser", ArgString, (void *) &appData.remoteUser, FALSE, (ArgIniType) "" },
SendToProgram(buf, &first);
}
+Boolean right; // instructs front-end to use button-1 events as if they were button 3
+
void
LeftClick (ClickType clickType, int xPix, int yPix)
{
ChessSquare piece;
static TimeMark lastClickTime, prevClickTime;
- if(SeekGraphClick(clickType, xPix, yPix, 0)) return;
-
- prevClickTime = lastClickTime; GetTimeMark(&lastClickTime);
-
- if (clickType == Press) ErrorPopDown();
- lastClickType = clickType, lastLeftX = xPix, lastLeftY = yPix; // [HGM] alien: remember state
-
x = EventToSquare(xPix, BOARD_WIDTH);
y = EventToSquare(yPix, BOARD_HEIGHT);
if (!flipView && y >= 0) {
x = BOARD_WIDTH - 1 - x;
}
+ if(appData.monoMouse && gameMode == EditPosition && clickType == Press && boards[currentMove][y][x] == EmptySquare) {
+ static int dummy;
+ RightClick(clickType, xPix, yPix, &dummy, &dummy);
+ right = TRUE;
+ return;
+ }
+
+ if(SeekGraphClick(clickType, xPix, yPix, 0)) return;
+
+ prevClickTime = lastClickTime; GetTimeMark(&lastClickTime);
+
+ if (clickType == Press) ErrorPopDown();
+ lastClickType = clickType, lastLeftX = xPix, lastLeftY = yPix; // [HGM] alien: remember state
+
if(promoSweep != EmptySquare) { // up-click during sweep-select of promo-piece
defaultPromoChoice = promoSweep;
promoSweep = EmptySquare; // terminate sweep
Boolean autoCopyPV;
Boolean pieceMenu;
Boolean sweepSelect;
+ Boolean monoMouse;
Boolean whitePOV;
Boolean scoreWhite;
Boolean pvSAN[ENGINES];
static int but1, but3, oldW, oldH;
int menuNr = -3, sizing, f, r;
TimeMark now;
+ extern Boolean right;
+
+ if(right) { // kludgy way to let button 1 double as button 3 when back-end requests this
+ if(but1 && n == 0) but1 = 0, but3 = 1;
+ else if(n == -1) n = -3, right = FALSE;
+ }
if(n == 0) { // motion
if(SeekGraphClick(Press, x, y, 1)) return NULL;