mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
Add test to allow dragging a selected tile.
This commit is contained in:
parent
5ffb365510
commit
c1cde174db
1 changed files with 1 additions and 5 deletions
|
@ -265,7 +265,7 @@ handleActionInTray( BoardCtxt* board, XP_S16 index, XP_Bool onDivider,
|
||||||
/* Tap on selected tile unselects. If we don't do this,
|
/* Tap on selected tile unselects. If we don't do this,
|
||||||
then there's no way to unselect and so no way to turn
|
then there's no way to unselect and so no way to turn
|
||||||
off the placement arrow */
|
off the placement arrow */
|
||||||
if ( newIndex == selFlags ) {
|
if ( !waitPenUp && newIndex == selFlags ) {
|
||||||
board_invalTrayTiles( board, selFlags );
|
board_invalTrayTiles( board, selFlags );
|
||||||
selFlags = NO_TILES;
|
selFlags = NO_TILES;
|
||||||
board->traySelBits[selPlayer] = selFlags;
|
board->traySelBits[selPlayer] = selFlags;
|
||||||
|
@ -316,7 +316,6 @@ startTileDrag( BoardCtxt* board, TileBit startBit/* , XP_U16 x, XP_U16 y */ )
|
||||||
state->movePending = XP_TRUE;
|
state->movePending = XP_TRUE;
|
||||||
|
|
||||||
state->dragInProgress = XP_TRUE;
|
state->dragInProgress = XP_TRUE;
|
||||||
XP_STATUSF( "startTileDrag: set dragInProgress\n" );
|
|
||||||
state->prevIndex = board->traySelBits[turn] = startBit;
|
state->prevIndex = board->traySelBits[turn] = startBit;
|
||||||
|
|
||||||
if ( !state->wasHilited ) {
|
if ( !state->wasHilited ) {
|
||||||
|
@ -336,8 +335,6 @@ moveTileInTray( BoardCtxt* board, TileBit prevTile, TileBit newTile )
|
||||||
Tile tile;
|
Tile tile;
|
||||||
XP_U16 dividerLoc;
|
XP_U16 dividerLoc;
|
||||||
|
|
||||||
XP_STATUSF( "moveTileInTray: %d -> %d\n", prevTile, newTile );
|
|
||||||
|
|
||||||
tile = model_removePlayerTile( model, selPlayer, moveFrom );
|
tile = model_removePlayerTile( model, selPlayer, moveFrom );
|
||||||
model_addPlayerTile( model, selPlayer, moveTo, tile );
|
model_addPlayerTile( model, selPlayer, moveTo, tile );
|
||||||
|
|
||||||
|
@ -421,7 +418,6 @@ endTileDragIndex( BoardCtxt* board, TileBit last )
|
||||||
}
|
}
|
||||||
|
|
||||||
state->dragInProgress = XP_FALSE;
|
state->dragInProgress = XP_FALSE;
|
||||||
XP_STATUSF( "endTileDrag: cleared dragInProgress\n" );
|
|
||||||
return result;
|
return result;
|
||||||
} /* endTileDragIndex */
|
} /* endTileDragIndex */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue