1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

disable text

This commit is contained in:
Laserlicht
2025-11-06 23:16:57 +01:00
parent 59936017fb
commit 43c66f5086
3 changed files with 32 additions and 0 deletions

View File

@@ -264,6 +264,7 @@ void InfoCard::changeSelection()
labelLossConditionText->setText(header->defeatMessage.toString());
flagbox->recreate();
labelDifficulty->setText(LIBRARY->generaltexth->arraytxt[142 + vstd::to_underlying(mapInfo->mapHeader->difficulty)]);
iconDifficulty->activate();
iconDifficulty->setSelected(SEL->getCurrentDifficulty());
if(SEL->screenType == ESelectionScreen::loadGame || SEL->screenType == ESelectionScreen::saveGame)
for(auto & button : iconDifficulty->buttons)
@@ -294,6 +295,24 @@ void InfoCard::changeSelection()
}
}
void InfoCard::clearSelection()
{
labelSaveDate->setText("");
mapName->setText("");
mapDescription->setText("");
if(SEL->screenType == ESelectionScreen::campaignList)
return;
labelMapSize->setText("");
labelVictoryConditionText->setText("");
labelLossConditionText->setText("");
iconDifficulty->deactivate();
labelDifficulty->setText("");
labelDifficultyPercent->setText("");
}
void InfoCard::toggleChat()
{
setChat(!showChat);