From 4135674c17746c3e9f5833069f4af119fe3596f1 Mon Sep 17 00:00:00 2001 From: tpcstld Date: Wed, 16 Apr 2014 02:54:28 -0400 Subject: [PATCH] Fixed crash bug. --- AndroidManifest.xml | 4 ++-- res/menu/game_main.xml | 6 ++---- res/values/strings.xml | 2 +- src/com/tpcstld/jetris/StartGameActivity.java | 17 ++++++++--------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index ea29525..5dd1041 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="11" + android:versionName="1.0.4b" > + android:title="@string/new_game"/> + android:title="@string/action_pause"/> \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 4882d1c..cdc975d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -106,7 +106,7 @@ \n\t \n\t No-Clear Twists only give points in 3-corner T mode. \n\t Only T-Tetriminos can twist in 3-corner T mode. - \nVersion: 1.0.4a + \nVersion: 1.0.4b \nProduced by Jerry Jiang (tpcstld) \nLogo by Margaret Lu \n diff --git a/src/com/tpcstld/jetris/StartGameActivity.java b/src/com/tpcstld/jetris/StartGameActivity.java index 6425184..c001a71 100644 --- a/src/com/tpcstld/jetris/StartGameActivity.java +++ b/src/com/tpcstld/jetris/StartGameActivity.java @@ -88,25 +88,24 @@ public boolean onCreateOptionsMenu(Menu menu) { public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: - // This ID represents the Home or Up button. In the case of this - // activity, the Up button is shown. Use NavUtils to allow users - // to navigate up one level in the application structure. For - // more details, see the Navigation pattern on Android Design: - // - // http://developer.android.com/design/patterns/navigation.html#up-vs-back - // NavUtils.navigateUpFromSameTask(this); return true; + case R.id.newgame: + newGame(); + return true; + case R.id.pause: + pauseGame(); + return true; } return super.onOptionsItemSelected(item); } - public void pauseGame(MenuItem item) { + public void pauseGame() { mainView.pauseGame(!MainGame.pause); updatePauseMessage(); } - public void newGame(MenuItem item) { + public void newGame() { mainView.newGame(); updatePauseMessage(); }