Skip to content

Commit

Permalink
Fixed crash bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpcstld committed Apr 16, 2014
1 parent 52ff360 commit 4135674
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tpcstld.jetris"
android:versionCode="10"
android:versionName="1.0.4a" >
android:versionCode="11"
android:versionName="1.0.4b" >

<uses-sdk
android:minSdkVersion="11"
Expand Down
6 changes: 2 additions & 4 deletions res/menu/game_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
android:id="@+id/newgame"
android:orderInCategory="0"
android:showAsAction="never"
android:title="@string/new_game"
android:onClick="newGame"/>
android:title="@string/new_game"/>
<item
android:id="@+id/pause"
android:orderInCategory="1"
android:showAsAction="never"
android:title="@string/action_pause"
android:onClick="pauseGame"/>
android:title="@string/action_pause"/>

</menu>
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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. </string>
<string name="about_info">\nVersion: 1.0.4a
<string name="about_info">\nVersion: 1.0.4b
\nProduced by Jerry Jiang (tpcstld)
\nLogo by Margaret Lu
\n
Expand Down
17 changes: 8 additions & 9 deletions src/com/tpcstld/jetris/StartGameActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 4135674

Please sign in to comment.