1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-15 20:03:15 +02:00

Fixed monster strength selection.

This commit is contained in:
DjWarmonger
2014-06-15 12:00:34 +02:00
parent 01355a77d8
commit e56f41b8be

View File

@@ -1716,7 +1716,10 @@ CRandomMapTab::CRandomMapTab()
addButtonsWithRandToGroup(monsterStrengthGroup, monsterStrengthBtns, 0, 2, WIDE_BTN_WIDTH, 248, 251);
monsterStrengthGroup->onChange = [&](int btnId)
{
mapGenOptions.setMonsterStrength(static_cast<EMonsterStrength::EMonsterStrength>(btnId + EMonsterStrength::GLOBAL_WEAK)); //value 2 to 4
if (btnId < 0)
mapGenOptions.setMonsterStrength(EMonsterStrength::RANDOM);
else
mapGenOptions.setMonsterStrength(static_cast<EMonsterStrength::EMonsterStrength>(btnId + EMonsterStrength::GLOBAL_WEAK)); //value 2 to 4
};
// Show random maps btn