X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/FreeShisen/blobdiff_plain/03f986eeb7aa5f6f8ca2e6856d98046993969cb5..d8d223b49ecc41f4d2d64fa5dcb96709c46f5cb4:/src/de/cwde/freeshisen/ShisenShoActivity.java diff --git a/src/de/cwde/freeshisen/ShisenShoActivity.java b/src/de/cwde/freeshisen/ShisenShoActivity.java index 311c7b1..0134ad7 100644 --- a/src/de/cwde/freeshisen/ShisenShoActivity.java +++ b/src/de/cwde/freeshisen/ShisenShoActivity.java @@ -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(); + } }