]> git.zerfleddert.de Git - FreeShisen/blobdiff - src/de/cwde/freeshisen/ShisenShoActivity.java
fix stuff.
[FreeShisen] / src / de / cwde / freeshisen / ShisenShoActivity.java
index 311c7b126be34799e60a0b654d0ab875667fcd66..0134ad7c29b7e5c1c5d0e65f1d748dc094b70295 100644 (file)
@@ -2,6 +2,7 @@ package de.cwde.freeshisen;
 
 import android.app.Activity;
 import android.app.AlertDialog;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -120,4 +121,25 @@ public class ShisenShoActivity extends Activity {
                        e.printStackTrace();
                }
        }
+
+       public void onOptionsChanged()
+       {
+               new AlertDialog.Builder(this)
+               .setTitle("Preferences changed!") // FIXME: hardcoded string
+               .setCancelable(true)
+               .setIcon(R.drawable.icon)
+               .setPositiveButton(android.R.string.yes,
+                               new DialogInterface.OnClickListener() {
+                       public void onClick(DialogInterface dialog, int id) {
+                               // User clicked OK button - reset game
+                               view.reset();
+                       }
+               })
+               .setNegativeButton(android.R.string.no, null)
+               .setMessage("Changes in Preferences will only have an effect if" +
+                               " a new game is started. Abort current game and start" +
+                               " a new one?") // FIXME: hardcoded string
+                               .create()
+                               .show();
+       }
 }
Impressum, Datenschutz