minor bugs with tray focus: player color not used for pending score;

pending score doesn't show focus; focussed empty tile slots drawn with
bogus value.
This commit is contained in:
eehouse 2010-03-08 06:09:40 +00:00
parent 0a34c2512c
commit 6bb1170ca8

View file

@ -457,8 +457,9 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
{
String text = score >= 0? String.format( "%d", score ) : "??";
++rect.top;
clearToBack( rect );
m_fillPaint.setColor( BLACK );
fillRect( rect, (0 == (flags & CELL_ISCURSOR))
? WHITE : m_otherColors[CommonPrefs.COLOR_FOCUS] );
m_fillPaint.setColor( m_playerColors[playerNum] );
rect.inset( 0, rect.height() / 4 );
drawCentered( text, rect, null );
}
@ -576,12 +577,15 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
}
m_fillPaint.setColor( m_playerColors[m_trayOwner] );
positionDrawTile( rect, text, bitmaps, val );
m_canvas.drawRect( rect, m_tileStrokePaint); // frame
if ( 0 != (flags & CELL_HIGHLIGHT) ) {
rect.inset( 2, 2 );
m_canvas.drawRect( rect, m_tileStrokePaint ); // frame
if ( notEmpty ) {
positionDrawTile( rect, text, bitmaps, val );
m_canvas.drawRect( rect, m_tileStrokePaint); // frame
if ( 0 != (flags & CELL_HIGHLIGHT) ) {
rect.inset( 2, 2 );
m_canvas.drawRect( rect, m_tileStrokePaint ); // frame
}
}
}
m_canvas.restoreToCount(1); // in case new canvas....