clear the net status rect for standalone games' boards to avoid ghost

button effect when they're opened after a networked game.
This commit is contained in:
Eric House 2015-07-17 06:10:08 -07:00
parent 6851fd9746
commit c796e7d4cc
2 changed files with 7 additions and 0 deletions

View file

@ -146,6 +146,11 @@ public class ConnStatusHandler {
s_rect = new Rect( left, top, right, bottom ); s_rect = new Rect( left, top, right, bottom );
} }
public static void clearRect()
{
s_rect = null;
}
public static void setHandler( ConnStatusCBacks cbacks ) public static void setHandler( ConnStatusCBacks cbacks )
{ {
s_cbacks = cbacks; s_cbacks = cbacks;

View file

@ -250,6 +250,8 @@ public class JNIThread extends Thread {
int left = dims.scoreLeft + dims.scoreWidth + dims.timerWidth; int left = dims.scoreLeft + dims.scoreWidth + dims.timerWidth;
ConnStatusHandler.setRect( left, dims.top, left + statusWidth, ConnStatusHandler.setRect( left, dims.top, left + statusWidth,
dims.top + dims.scoreHt ); dims.top + dims.scoreHt );
} else {
ConnStatusHandler.clearRect();
} }
XwJNI.board_applyLayout( m_jniGamePtr, dims ); XwJNI.board_applyLayout( m_jniGamePtr, dims );