mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
fix difficulty widget
This commit is contained in:
parent
c0f0211098
commit
36ab973dc8
@ -216,6 +216,10 @@ void InfoCard::changeSelection()
|
||||
flagbox->recreate();
|
||||
labelDifficulty->setText(CGI->generaltexth->arraytxt[142 + mapInfo->mapHeader->difficulty]);
|
||||
iconDifficulty->setSelected(SEL->getCurrentDifficulty());
|
||||
if(SEL->screenType == ESelectionScreen::loadGame)
|
||||
for(auto & button : iconDifficulty->buttons)
|
||||
button.second->setEnabled(button.first == SEL->getCurrentDifficulty());
|
||||
|
||||
const std::array<std::string, 5> difficultyPercent = {"80%", "100%", "130%", "160%", "200%"};
|
||||
labelDifficultyPercent->setText(difficultyPercent[SEL->getCurrentDifficulty()]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user