From 1550aefc0641670c294e0bf1b93e4aaa83fd10f8 Mon Sep 17 00:00:00 2001 From: ehouse Date: Mon, 1 Mar 2004 02:31:25 +0000 Subject: [PATCH] fix reverse-highlighting of cells --- palm/palmdraw.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/palm/palmdraw.c b/palm/palmdraw.c index 78a32e737..c1f2eb1fc 100644 --- a/palm/palmdraw.c +++ b/palm/palmdraw.c @@ -141,7 +141,7 @@ palm_clr_draw_drawCell( DrawCtx* p_dctx, XP_Rect* rect, if ( isPending ) { /* don't color background if will invert */ index = COLOR_WHITE; - } else if ( !!bitmap || (!!letters && XP_STRLEN((const char*)letters) > 0) ) { + } else if ( !!bitmap || (!!letters && XP_STRLEN((const char*)letters) > 0)){ index = COLOR_TILE; } else if ( bonus == BONUS_NONE ) { index = COLOR_EMPTY; @@ -151,9 +151,14 @@ palm_clr_draw_drawCell( DrawCtx* p_dctx, XP_Rect* rect, color = dctx->drawingPrefs->drawColors[index]; WinSetBackColor( color ); - index = (owner >= 0)? COLOR_PLAYER1 + owner: COLOR_BLACK; - color = dctx->drawingPrefs->drawColors[index]; if ( !!letters ) { + if ( (owner >= 0) && !isPending ) { + index = COLOR_PLAYER1 + owner; + } else { + index = COLOR_BLACK; + } + + color = dctx->drawingPrefs->drawColors[index]; WinSetTextColor( color ); }