diff --git a/common/boarddrw.c b/common/boarddrw.c index 3551f993f..32da4583a 100644 --- a/common/boarddrw.c +++ b/common/boarddrw.c @@ -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 ); } diff --git a/common/draw.h b/common/draw.h index 5076e33a3..520b6fdb2 100644 --- a/common/draw.h +++ b/common/draw.h @@ -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; diff --git a/common/tray.c b/common/tray.c index d88b03445..ff7711770 100644 --- a/common/tray.c +++ b/common/tray.c @@ -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 ); } } }