Merge pull request #7098 from Ebola16/ElfDolMessage
Android: Add AlertDialog for files without Game IDs in Game Settings
This commit is contained in:
commit
69f079b371
|
@ -136,17 +136,20 @@ public final class GameAdapter extends RecyclerView.Adapter<GameViewHolder> impl
|
|||
@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 final class GameRowPresenter extends Presenter
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue