Permalink
Browse files

Android: Add AlertDialog for files without Game IDs in Game Settings

  • Loading branch information...
Ebola16 committed Jun 9, 2018
1 parent 48b7cfa commit fb3ae94acb83f90a1554bf34b4c827c70850e40f
@@ -136,17 +136,20 @@ public void onClick(View view)
@Override
public boolean onLongClick(View view)
{
FragmentActivity activity = (FragmentActivity) view.getContext();
GameViewHolder holder = (GameViewHolder) view.getTag();
String gameId = holder.gameFile.getGameId();
if (gameId.isEmpty())
{
// We can't make a game-specific INI file if there is no game ID
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Game Settings");
builder.setMessage("Files without game IDs don't support game-specific settings.");
builder.show();
return true;
}
FragmentActivity activity = (FragmentActivity) view.getContext();
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Game Settings")
.setItems(R.array.gameSettingsMenus, new DialogInterface.OnClickListener() {
@@ -89,7 +89,11 @@ public boolean onLongClick(View view)
if (gameId.isEmpty())
{
// We can't make a game-specific INI file if there is no game ID
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle("Game Settings");
builder.setMessage("Files without game IDs don't support game-specific settings.");
builder.show();
return true;
}

0 comments on commit fb3ae94

Please sign in to comment.