1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

add persistent storage & completed campaign support

This commit is contained in:
Laserlicht
2023-09-20 22:18:53 +02:00
committed by GitHub
parent 52b86eb9c1
commit dfb5ccbeaf
5 changed files with 29 additions and 8 deletions

View File

@@ -107,6 +107,9 @@ CCampaignScreen::CCampaignButton::CCampaignButton(const JsonNode & config, std::
auto header = CampaignHandler::getHeader(campFile);
hoverText = header->getName();
if(persistent["campaign"][campaignSet][header->getFilename()]["completed"].Bool())
status = CCampaignScreen::COMPLETED;
if(status != CCampaignScreen::DISABLED)
{
addUsedEvents(LCLICK | HOVER);