]> hydra-www.ietfng.org Git - acmetensortoys-ctfws-android/commitdiff
According to all known laws of aviation...
authorCameron Wong <camtech075@gmail.com>
Thu, 16 Feb 2017 22:56:16 +0000 (17:56 -0500)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Sat, 18 Feb 2017 21:16:02 +0000 (16:16 -0500)
mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainActivity.java

index 0a94e211f0e2b0b180b480086319d689b11a21af..a7138215e371969e36907bc869b6a2ccbc14e27d 100644 (file)
@@ -130,13 +130,18 @@ public class MainActivity extends AppCompatActivity {
     private boolean egg = false;
     @SuppressLint({"SetTextI18n"})
     public void onclick_gamestate(View v) {
-        TextView tv = (TextView) v;
-        if (egg) {
-            tv.setText(R.string.header_gamestate);
-        } else {
-            ((TextView) v).setText("DO NOT TAP ON GLASS");
+        final TextView tv = (TextView) v;
+        // Cam: Because every good easter egg needs to be way over-engineered.
+        if (!egg) {
+            egg = true;
+            tv.setText("DO NOT TAP ON GLASS");
+            tv.postDelayed(new Runnable() {
+                public void run() {
+                    tv.setText(R.string.header_gamestate);
+                    egg = false;
+                }
+            }, 3000);
         }
-        egg = !egg;
     }
 
     // Kick the mqtt layer on a click on the status stuff