From c796e7d4cc513b726e1e5d0c6ae261a68e6fabb5 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 17 Jul 2015 06:10:08 -0700 Subject: [PATCH] clear the net status rect for standalone games' boards to avoid ghost button effect when they're opened after a networked game. --- .../src/org/eehouse/android/xw4/ConnStatusHandler.java | 5 +++++ .../XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java | 2 ++ 2 files changed, 7 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ConnStatusHandler.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ConnStatusHandler.java index f030afd74..df0ca1c45 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ConnStatusHandler.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ConnStatusHandler.java @@ -146,6 +146,11 @@ public class ConnStatusHandler { s_rect = new Rect( left, top, right, bottom ); } + public static void clearRect() + { + s_rect = null; + } + public static void setHandler( ConnStatusCBacks cbacks ) { s_cbacks = cbacks; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java index ad22c69e2..cee2eaeb3 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/JNIThread.java @@ -250,6 +250,8 @@ public class JNIThread extends Thread { int left = dims.scoreLeft + dims.scoreWidth + dims.timerWidth; ConnStatusHandler.setRect( left, dims.top, left + statusWidth, dims.top + dims.scoreHt ); + } else { + ConnStatusHandler.clearRect(); } XwJNI.board_applyLayout( m_jniGamePtr, dims );