浏览代码

fix difficulty widget

Michael 2 年之前
父节点
当前提交
3d08518dac
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      client/lobby/CSelectionBase.cpp

+ 4 - 0
client/lobby/CSelectionBase.cpp

@@ -218,6 +218,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()]);