mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Merge branch 'PregameCache' into develop
This commit is contained in:
commit
9e366df70f
@ -1088,9 +1088,9 @@ void SelectionTab::filter( int size, bool selectFirst )
|
||||
{
|
||||
slider->moveTo(0);
|
||||
onSelect(curItems[0]);
|
||||
}
|
||||
selectAbs(0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
slider->block(true);
|
||||
@ -1304,16 +1304,24 @@ SelectionTab::SelectionTab(CMenuScreen::EState Type, const std::function<void(CM
|
||||
switch(tabType)
|
||||
{
|
||||
case CMenuScreen::newGame:
|
||||
logGlobal->error(settings["session"]["lastMap"].String());
|
||||
if(settings["session"]["lastMap"].isNull())
|
||||
selectFName("Maps/Arrogance");
|
||||
else
|
||||
selectFName(settings["session"]["lastMap"].String());
|
||||
|
||||
break;
|
||||
case CMenuScreen::loadGame:
|
||||
case CMenuScreen::campaignList:
|
||||
select(0);
|
||||
break;
|
||||
case CMenuScreen::loadGame:
|
||||
case CMenuScreen::saveGame:;
|
||||
if(saveGameName.empty())
|
||||
{
|
||||
if(tabType == CMenuScreen::saveGame)
|
||||
txt->setText("NEWGAME");
|
||||
else
|
||||
select(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1371,6 +1379,12 @@ void SelectionTab::select( int position )
|
||||
else if(position >= positions)
|
||||
slider->moveBy(position - positions + 1);
|
||||
|
||||
if(tabType == CMenuScreen::newGame)
|
||||
{
|
||||
Settings lastMap = settings.write["session"]["lastMap"];
|
||||
lastMap->String() = getSelectedMapInfo()->fileURI;
|
||||
}
|
||||
|
||||
if(txt)
|
||||
{
|
||||
auto filename = *CResourceHandler::get("local")->getResourceName(
|
||||
|
Loading…
x
Reference in New Issue
Block a user