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