mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Merge pull request #417 from kwsch/b/gen4-box-layout
Fixed crash when opening SAV_BoxLayout with Gen 4 save
This commit is contained in:
commit
f78bbb48a0
1 changed files with 15 additions and 5 deletions
|
@ -15,11 +15,21 @@ namespace PKHeX
|
|||
// Repopulate Wallpaper names
|
||||
CB_BG.Items.Clear();
|
||||
|
||||
if (SAV.Generation == 6)
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames);
|
||||
else if (SAV.Generation == 7)
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames.Take(16).ToArray());
|
||||
|
||||
switch (SAV.Generation)
|
||||
{
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames);
|
||||
break;
|
||||
case 7:
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames.Take(16).ToArray());
|
||||
break;
|
||||
default:
|
||||
Util.Error("Box layout is not supported for this game.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Go
|
||||
LB_BoxSelect.Items.Clear();
|
||||
for (int i = 0; i < SAV.BoxCount; i++)
|
||||
|
|
Loading…
Reference in a new issue