mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
Indicate tiles whose values should be hidden with a new bit rather
than a negative value.
This commit is contained in:
parent
6453f49e67
commit
3e749c898c
3 changed files with 11 additions and 11 deletions
|
@ -482,12 +482,15 @@ drawDragTileIf( BoardCtxt* board )
|
|||
dragDropTileInfo( board, &tile, &isBlank );
|
||||
|
||||
face = getTileDrawInfo( board, tile, isBlank, &bitmap,
|
||||
&value, buf, sizeof(buf) );
|
||||
&value, buf, sizeof(buf) );
|
||||
|
||||
flags = CELL_DRAGCUR;
|
||||
if ( isBlank ) {
|
||||
flags |= CELL_ISBLANK;
|
||||
}
|
||||
if ( board->hideValsInTray && !board->showCellValues ) {
|
||||
flags |= CELL_VALHIDDEN;
|
||||
}
|
||||
draw_drawTileMidDrag( board->draw, &rect, face, bitmap, value,
|
||||
board->selPlayer, flags );
|
||||
}
|
||||
|
|
|
@ -37,8 +37,9 @@ typedef enum {
|
|||
, CELL_ISSTAR = 0x04
|
||||
, CELL_ISCURSOR = 0x08
|
||||
, CELL_ISEMPTY = 0x10 /* of a tray tile slot */
|
||||
, CELL_DRAGSRC = 0x20 /* where drag originated */
|
||||
, CELL_DRAGCUR = 0x40 /* where drag is now */
|
||||
, CELL_VALHIDDEN = 0x20 /* show letter only, not value */
|
||||
, CELL_DRAGSRC = 0x40 /* where drag originated */
|
||||
, CELL_DRAGCUR = 0x80 /* where drag is now */
|
||||
, CELL_ALL = 0xFF
|
||||
} CellFlags;
|
||||
|
||||
|
|
|
@ -160,13 +160,15 @@ drawTray( BoardCtxt* board )
|
|||
XP_U16 numInTray = countTilesToShow( board );
|
||||
XP_Bool isBlank;
|
||||
XP_Bool isADrag = dragDropInProgress( board );
|
||||
CellFlags baseFlags = board->hideValsInTray && !board->showCellValues
|
||||
? CELL_VALHIDDEN : CELL_NONE;
|
||||
|
||||
dragDropGetTrayChanges( board, &ddRmvdIndx, &ddAddedIndx );
|
||||
|
||||
/* draw in reverse order so drawing happens after
|
||||
erasing */
|
||||
for ( ii = MAX_TRAY_TILES - 1; ii >= 0; --ii ) {
|
||||
CellFlags flags = CELL_NONE;
|
||||
CellFlags flags = baseFlags;
|
||||
XP_U16 mask = 1 << ii;
|
||||
|
||||
if ( (board->trayInvalBits & mask) == 0 ) {
|
||||
|
@ -210,11 +212,6 @@ drawTray( BoardCtxt* board )
|
|||
textP = getTileDrawInfo( board, tile, isBlank,
|
||||
&bitmap, &value,
|
||||
buf, sizeof(buf) );
|
||||
if ( board->hideValsInTray
|
||||
&& !board->showCellValues ) {
|
||||
value = -1;
|
||||
}
|
||||
|
||||
if ( isADrag ) {
|
||||
if ( ddAddedIndx == ii ) {
|
||||
flags |= CELL_HIGHLIGHT;
|
||||
|
@ -229,8 +226,7 @@ drawTray( BoardCtxt* board )
|
|||
draw_drawTile( board->draw, &tileRect, textP,
|
||||
bitmap, value, flags );
|
||||
} else {
|
||||
draw_drawTileBack( board->draw, &tileRect,
|
||||
flags );
|
||||
draw_drawTileBack( board->draw, &tileRect, flags );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue