2022-04-26 14:14:31 +03:00
|
|
|
/*
|
|
|
|
* CCampaignInfoScreen.cpp, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "StdInc.h"
|
|
|
|
|
|
|
|
#include "CCampaignInfoScreen.h"
|
|
|
|
|
2025-05-11 11:58:09 +03:00
|
|
|
#include "../../lib/callback/CCallback.h"
|
2024-07-20 12:55:17 +00:00
|
|
|
#include "../../lib/texts/CGeneralTextHandler.h"
|
2022-04-26 14:14:31 +03:00
|
|
|
#include "../../lib/StartInfo.h"
|
|
|
|
#include "../../lib/mapping/CMapInfo.h"
|
2023-05-24 02:05:59 +03:00
|
|
|
#include "../../lib/mapping/CMapHeader.h"
|
2025-02-10 21:49:23 +00:00
|
|
|
#include "../GameEngine.h"
|
2025-02-11 15:23:33 +00:00
|
|
|
#include "../GameInstance.h"
|
2022-04-26 14:14:31 +03:00
|
|
|
#include "../CPlayerInterface.h"
|
|
|
|
|
|
|
|
CCampaignInfoScreen::CCampaignInfoScreen()
|
|
|
|
{
|
2024-08-09 15:30:04 +00:00
|
|
|
OBJECT_CONSTRUCTION;
|
2025-04-27 19:58:21 +03:00
|
|
|
localSi = std::make_unique<StartInfo>(*GAME->interface()->cb->getStartInfo());
|
|
|
|
localMi = std::make_unique<CMapInfo>();
|
2025-02-11 15:23:33 +00:00
|
|
|
localMi->mapHeader = std::unique_ptr<CMapHeader>(new CMapHeader(*GAME->interface()->cb->getMapHeader()));
|
2022-04-26 14:14:31 +03:00
|
|
|
|
|
|
|
screenType = ESelectionScreen::scenarioInfo;
|
|
|
|
|
|
|
|
updateAfterStateChange();
|
|
|
|
}
|
|
|
|
|
2025-04-27 19:58:21 +03:00
|
|
|
CCampaignInfoScreen::~CCampaignInfoScreen() = default;
|
2022-04-26 14:14:31 +03:00
|
|
|
|
|
|
|
const CMapInfo * CCampaignInfoScreen::getMapInfo()
|
|
|
|
{
|
2025-04-27 19:58:21 +03:00
|
|
|
return localMi.get();
|
2022-04-26 14:14:31 +03:00
|
|
|
}
|
|
|
|
const StartInfo * CCampaignInfoScreen::getStartInfo()
|
|
|
|
{
|
2025-04-27 19:58:21 +03:00
|
|
|
return localSi.get();
|
2022-04-26 14:14:31 +03:00
|
|
|
}
|