mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
When showing cell values, also show tile values if the don't-show tile values preference is set.
This commit is contained in:
parent
128d9c56ef
commit
13803e2596
3 changed files with 14 additions and 3 deletions
|
@ -1545,8 +1545,18 @@ board_flip( BoardCtxt* board )
|
|||
XP_Bool
|
||||
board_toggle_showValues( BoardCtxt* board )
|
||||
{
|
||||
XP_Bool changed;
|
||||
board->showCellValues = !board->showCellValues;
|
||||
return invalCellsWithTiles( board );
|
||||
|
||||
/* We show the tile values when showCellValues is set even if
|
||||
hideValsInTray is set. So inval the tray if there will be a change.
|
||||
And set changed to true in case there are no tiles on the baord yet.
|
||||
*/
|
||||
changed = board->hideValsInTray && (board->trayVisState == TRAY_REVEALED);
|
||||
if ( changed ) {
|
||||
board_invalTrayTiles( board, ALLTILES );
|
||||
}
|
||||
return invalCellsWithTiles( board ) || changed;
|
||||
} /* board_toggle_showValues */
|
||||
|
||||
XP_Bool
|
||||
|
|
|
@ -1531,7 +1531,7 @@ nextTurn( ServerCtxt* server, XP_S16 nxtTurn )
|
|||
"has" enough to be allowed to take the turn just undone. */
|
||||
playerTilesLeft = MAX_TRAY_TILES;
|
||||
}
|
||||
SETSTATE( server, XWSTATE_INTURN ); /* unless game over */
|
||||
SETSTATE( server, XWSTATE_INTURN ); /* even if game over, if undoing */
|
||||
|
||||
if ( (playerTilesLeft > 0) && tileCountsOk(server) && NPASSES_OK(server) ){
|
||||
|
||||
|
|
|
@ -172,7 +172,8 @@ drawTray( BoardCtxt* board )
|
|||
dict_tilesToString( dictionary, &tile, 1,
|
||||
textP, sizeof(buf) );
|
||||
}
|
||||
if ( board->hideValsInTray ) {
|
||||
if ( board->hideValsInTray
|
||||
&& !board->showCellValues ) {
|
||||
value = -1;
|
||||
} else {
|
||||
value = dict_getTileValue( dictionary, tile );
|
||||
|
|
Loading…
Reference in a new issue