Skip to content

Commit

Permalink
Merge pull request #7098 from Ebola16/ElfDolMessage
Browse files Browse the repository at this point in the history
Android: Add AlertDialog for files without Game IDs in Game Settings
  • Loading branch information
leoetlino committed Jun 10, 2018
2 parents fca6d80 + fb3ae94 commit 69f079b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Expand Up @@ -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() {
Expand Down
Expand Up @@ -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;
}

Expand Down

0 comments on commit 69f079b

Please sign in to comment.