- fill in the ADL bank menu from the internal table. Some of the names had to be shortened to prevent it from getting too confusing.

This commit is contained in:
Christoph Oelckers 2018-03-24 21:19:10 +01:00
commit 4e012e3765
3 changed files with 44 additions and 23 deletions

View file

@ -1381,6 +1381,8 @@ static void InitCrosshairsList()
// Initialize the music configuration submenus
//
//=============================================================================
extern const char* const banknames[74];
static void InitMusicMenus()
{
DMenuDescriptor **advmenu = MenuDescriptors.CheckKey("AdvSoundOptions");
@ -1418,6 +1420,21 @@ static void InitMusicMenus()
}
}
}
DMenuDescriptor **menu = MenuDescriptors.CheckKey("ADLBankMenu");
if (menu != nullptr)
{
if (soundfonts.Size() > 0)
{
for(int i=0;i<74;i++)
{
auto it = CreateOptionMenuItemCommand(banknames[i], FStringf("adl_bank %d", i), true);
static_cast<DOptionMenuDescriptor*>(*menu)->mItems.Push(it);
i++;
}
}
}
}
//=============================================================================