Permalink
Browse files

Indented the cheats more, removed the description

The description will be shown in the dialog that appears when they
click on the cheat, which is also where they’ll enable/disable or edit
the cheat. Also indented the rows more, and changed the list views to
wrap the header text instead of truncating it.
  • Loading branch information...
Mike McFadden
Mike McFadden committed Mar 14, 2015
1 parent 99dded1 commit dd61ecb5618e74bee9fcaa20d2970245f9cf381a
@@ -26,9 +26,6 @@
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" />
@@ -26,9 +26,6 @@
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" />
@@ -755,7 +755,6 @@ private void addCheats()
for ( int cheatIndex = 0; cheatIndex < cheats.size(); cheatIndex++ )
{
final String name = cheats.get( cheatIndex ).name;
final String desc = cheats.get( cheatIndex ).desc;
// Get the folder path for this cheat
final String[] newFolders = name.split( "\\\\" ); // why java why
@@ -813,7 +812,7 @@ public void onAction()
updateSidebar();
}
}, icon, folderIndex );
}, icon, folderIndex + 1 );
}
}
folders = newFolders;
@@ -829,15 +828,15 @@ public void onAction()
// Display the selected sub-option?
}*/
mGameSidebar.addRow( icon, folders[ folders.length - 1 ], desc, new GameSidebar.Action()
mGameSidebar.addRow( icon, folders[ folders.length - 1 ], null, new GameSidebar.Action()
{
@Override
public void onAction()
{
// Show the edit dialog for this cheat, where they can also enable/disable it or choose a sub-option
}
}, 0x0, folders.length - 1 );
}, 0x0, folders.length );
}
// If this was the last cheat in the selected folder, add the New cheat option
@@ -846,11 +845,11 @@ public void onAction()
newAdded = true;
// split returns the wrong value if it ends with the token to split on...?
int indentation = 0;
int indentation = 1;
if ( mSelectedCheat != null )
indentation = ( mSelectedCheat + " " ).split( "\\\\" ).length - 1;
indentation = ( mSelectedCheat + " " ).split( "\\\\" ).length;
mGameSidebar.addRow( R.drawable.ic_plus, getString( R.string.newCheat_title ), getString( R.string.newCheat_summary ), new GameSidebar.Action()
mGameSidebar.addRow( R.drawable.ic_plus, getString( R.string.newCheat_title ), null, new GameSidebar.Action()
{
@Override
public void onAction()
@@ -864,15 +863,15 @@ public void onAction()
if ( !newAdded )
{
mGameSidebar.addRow( R.drawable.ic_plus, getString( R.string.newCheat_title ), getString( R.string.newCheat_summary ), new GameSidebar.Action()
mGameSidebar.addRow( R.drawable.ic_plus, getString( R.string.newCheat_title ), null, new GameSidebar.Action()
{
@Override
public void onAction()
{
// Show the new cheat dialog
newCheat( "" );
}
});
}, 0x0, 1 );
}
}
@@ -967,7 +966,7 @@ public void onAction()
mGamePrefs.putCheatsEnabled( !mGamePrefs.getCheatsEnabled() );
updateSidebar();
}
}, 0x0, 0 );
}, 0x0, 1 );
// Add the cheats available for this game
if ( mGamePrefs.getCheatsEnabled() )

0 comments on commit dd61ecb

Please sign in to comment.