fix failure to draw timer in different player color when it has same

value as previous timer, e.g. when you're tapping on players who
haven't had a turn yet.  Note that without the test to prevent drawing
the same timer hints are broken -- device is too busy to make progress.
This commit is contained in:
Andy2 2011-04-01 07:49:31 -07:00
parent f6be6222a1
commit f64257752f

View file

@ -78,6 +78,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
private String m_remText;
private int m_dictPtr = 0;
private int m_lastSecsLeft;
private int m_lastTimerPlayer;
private Handler m_viewHandler;
// FontDims: exists to translate space available to the largest
@ -432,8 +433,10 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
public void drawTimer( Rect rect, int player, int secondsLeft )
{
if ( null != m_canvas && m_lastSecsLeft != secondsLeft ) {
if ( null != m_canvas && (m_lastSecsLeft != secondsLeft
|| m_lastTimerPlayer != player) ) {
m_lastSecsLeft = secondsLeft;
m_lastTimerPlayer = player;
String negSign = secondsLeft < 0? "-":"";
secondsLeft = Math.abs( secondsLeft );