X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/FreeShisen/blobdiff_plain/54d308ad9cbc7c1a415d5599129d29096594ee54..HEAD:/src/de/cwde/freeshisen/ShisenShoActivity.java diff --git a/src/de/cwde/freeshisen/ShisenShoActivity.java b/src/de/cwde/freeshisen/ShisenShoActivity.java index ab6efe7..483c6f1 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; @@ -113,11 +114,30 @@ public class ShisenShoActivity extends Activity { .setTitle(aboutTitle) .setCancelable(true) .setIcon(R.drawable.icon) - .setPositiveButton(getString(android.R.string.ok), null) + .setPositiveButton(android.R.string.ok, null) .setView(message).create() .show(); } catch (NameNotFoundException e) { e.printStackTrace(); } } + + public void onOptionsChanged() + { + new AlertDialog.Builder(this) + .setTitle(R.string.prefchange_confirm_title) + .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(R.string.prefchange_confirm_text) + .create() + .show(); + } }