X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/FreeShisen/blobdiff_plain/92b19250a620252d642c0abaf8dd3d733c299f3d..e1331c9ca833e2bcb07e8b3ad26c8c2394d279de:/src/de/cwde/freeshisen/ShisenSho.java diff --git a/src/de/cwde/freeshisen/ShisenSho.java b/src/de/cwde/freeshisen/ShisenSho.java index f4ee58e..f32fa70 100644 --- a/src/de/cwde/freeshisen/ShisenSho.java +++ b/src/de/cwde/freeshisen/ShisenSho.java @@ -14,6 +14,7 @@ public class ShisenSho extends Application { public int[] boardSize=new int[2]; public int difficulty=1; // 1=Easy, 2=Hard public int size=3; // 1=Small, 2=Medium, 3=Big + public String tilesetid = "classic"; public boolean gravity=true; public boolean timeCounter=true; @@ -83,6 +84,7 @@ public class ShisenSho extends Application { int difficulty = Integer.parseInt(sharedPref.getString("pref_diff", "1")); boolean gravity = sharedPref.getBoolean("pref_grav", true); boolean timeCounter = sharedPref.getBoolean("pref_time", true); + String tilesetid = sharedPref.getString("pref_tile", ""); boolean needsReset = false; @@ -101,14 +103,19 @@ public class ShisenSho extends Application { needsReset = true; } - if (timeCounter != this.timeCounter) { + if ((timeCounter != this.timeCounter) && (view != null)) { this.timeCounter = timeCounter; view.onTimeCounterActivate(); } + if ((tilesetid != this.tilesetid) && (view != null)) { + this.tilesetid = tilesetid; + view.loadTileset(); + } + if (needsReset && (view != null)) { view.reset(); } - } + } }