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

extend map format

This commit is contained in:
Laserlicht
2024-06-29 13:13:59 +02:00
parent 8444f7b330
commit 02bd52041b
14 changed files with 151 additions and 10 deletions

View File

@@ -43,8 +43,8 @@
#include "../../lib/rmg/CMapGenOptions.h"
#include "../../lib/Languages.h"
CMapOverview::CMapOverview(std::string mapName, std::string fileName, std::string date, ResourcePath resource, ESelectionScreen tabType)
: CWindowObject(BORDERED | RCLICK_POPUP), resource(resource), mapName(mapName), fileName(fileName), date(date), tabType(tabType)
CMapOverview::CMapOverview(std::string mapName, std::string fileName, std::string date, std::string author, std::string version, ResourcePath resource, ESelectionScreen tabType)
: CWindowObject(BORDERED | RCLICK_POPUP), resource(resource), mapName(mapName), fileName(fileName), date(date), author(author), version(version), tabType(tabType)
{
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
@@ -204,6 +204,14 @@ CMapOverviewWidget::CMapOverviewWidget(CMapOverview& parent):
else
w->setText(p.date);
}
if(auto w = widget<CLabel>("author"))
{
w->setText(p.author.empty() ? "-" : p.author);
}
if(auto w = widget<CLabel>("version"))
{
w->setText(p.version);
}
if(auto w = widget<CLabel>("noUnderground"))
{
if(minimaps.size() == 0)