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
|
@Override
|
||||||
public boolean onLongClick(View view)
|
public boolean onLongClick(View view)
|
||||||
{
|
{
|
||||||
|
FragmentActivity activity = (FragmentActivity) view.getContext();
|
||||||
GameViewHolder holder = (GameViewHolder) view.getTag();
|
GameViewHolder holder = (GameViewHolder) view.getTag();
|
||||||
String gameId = holder.gameFile.getGameId();
|
String gameId = holder.gameFile.getGameId();
|
||||||
|
|
||||||
if (gameId.isEmpty())
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
FragmentActivity activity = (FragmentActivity) view.getContext();
|
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle("Game Settings")
|
builder.setTitle("Game Settings")
|
||||||
.setItems(R.array.gameSettingsMenus, new DialogInterface.OnClickListener() {
|
.setItems(R.array.gameSettingsMenus, new DialogInterface.OnClickListener() {
|
||||||
|
|
|
@ -89,7 +89,11 @@ public final class GameRowPresenter extends Presenter
|
||||||
|
|
||||||
if (gameId.isEmpty())
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue