1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Merge pull request #4746 from Laserlicht/multiple_small_fixes

small fixes
This commit is contained in:
Ivan Savenko 2024-10-10 14:57:37 +03:00 committed by GitHub
commit 0fcd300008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -480,11 +480,11 @@ void SelectionTab::filter(int size, bool selectFirst)
if((elem->mapHeader && (!size || elem->mapHeader->width == size)) || tabType == ESelectionScreen::campaignList)
{
if(showRandom)
curFolder = "RANDOMMAPS/";
curFolder = "RandomMaps/";
auto [folderName, baseFolder, parentExists, fileInFolder] = checkSubfolder(elem->originalFileURI);
if((showRandom && baseFolder != "RANDOMMAPS") || (!showRandom && baseFolder == "RANDOMMAPS"))
if((showRandom && baseFolder != "RandomMaps") || (!showRandom && baseFolder == "RandomMaps"))
continue;
if(parentExists && !showRandom)
@ -715,7 +715,7 @@ void SelectionTab::selectFileName(std::string fname)
selectAbs(-1);
if(tabType == ESelectionScreen::saveGame && inputName->getText().empty())
inputName->setText("NEWGAME");
inputName->setText(CGI->generaltexth->translate("core.genrltxt.11"));
}
void SelectionTab::selectNewestFile()
@ -808,7 +808,7 @@ void SelectionTab::parseMaps(const std::unordered_set<ResourcePath> & files)
try
{
auto mapInfo = std::make_shared<ElementInfo>();
mapInfo->mapInit(file.getName());
mapInfo->mapInit(file.getOriginalName());
mapInfo->name = mapInfo->getNameForList();
if (isMapSupported(*mapInfo))
@ -874,7 +874,7 @@ void SelectionTab::parseCampaigns(const std::unordered_set<ResourcePath> & files
{
auto info = std::make_shared<ElementInfo>();
//allItems[i].date = std::asctime(std::localtime(&files[i].date));
info->fileURI = file.getName();
info->fileURI = file.getOriginalName();
info->campaignInit();
if(info->campaign)
allItems.push_back(info);