X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/FreeShisen/blobdiff_plain/03f986eeb7aa5f6f8ca2e6856d98046993969cb5..d8d223b49ecc41f4d2d64fa5dcb96709c46f5cb4:/src/de/cwde/freeshisen/ShisenSho.java diff --git a/src/de/cwde/freeshisen/ShisenSho.java b/src/de/cwde/freeshisen/ShisenSho.java index a1ee0eb..eb7aee3 100644 --- a/src/de/cwde/freeshisen/ShisenSho.java +++ b/src/de/cwde/freeshisen/ShisenSho.java @@ -1,8 +1,6 @@ package de.cwde.freeshisen; -import android.app.AlertDialog; import android.app.Application; -import android.content.DialogInterface; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.util.Log; @@ -21,6 +19,7 @@ public class ShisenSho extends Application { public boolean timeCounter=true; public void newPlay() { + loadOptions(); board = new Board(); board.buildRandomBoard(boardSize[0],boardSize[1],difficulty,gravity); } @@ -120,22 +119,7 @@ public class ShisenSho extends Application { } if (needsReset && (view != null) && (activity != null)) { - 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 - ((ShisenSho) ((AlertDialog) dialog).getContext()).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?").create() // FIXME: hardcoded string - .show(); + activity.onOptionsChanged(); } else { Log.d("ShisenSho", "Preferences changed, but no view or activity online - huh?"); }