1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Partially fixed initial loading of save file

Brought back the missing save file info in the info card. Still need to fix the input text box and selection highlight.
This commit is contained in:
Mike
2023-07-08 23:00:48 -07:00
parent 0c9e23edfa
commit b327f890f2
2 changed files with 6 additions and 3 deletions

View File

@@ -36,10 +36,10 @@ CSavingScreen::CSavingScreen()
localMi->mapHeader = std::unique_ptr<CMapHeader>(new CMapHeader(*LOCPLINT->cb->getMapHeader())); localMi->mapHeader = std::unique_ptr<CMapHeader>(new CMapHeader(*LOCPLINT->cb->getMapHeader()));
tabSel = std::make_shared<SelectionTab>(screenType); tabSel = std::make_shared<SelectionTab>(screenType);
curTab = tabSel;
tabSel->toggleMode();
tabSel->callOnSelect = std::bind(&CSavingScreen::changeSelection, this, _1); tabSel->callOnSelect = std::bind(&CSavingScreen::changeSelection, this, _1);
tabSel->toggleMode();
curTab = tabSel;
buttonStart = std::make_shared<CButton>(Point(411, 535), "SCNRSAV.DEF", CGI->generaltexth->zelp[103], std::bind(&CSavingScreen::saveGame, this), EShortcut::LOBBY_SAVE_GAME); buttonStart = std::make_shared<CButton>(Point(411, 535), "SCNRSAV.DEF", CGI->generaltexth->zelp[103], std::bind(&CSavingScreen::saveGame, this), EShortcut::LOBBY_SAVE_GAME);
} }

View File

@@ -442,6 +442,9 @@ void SelectionTab::updateListItems()
// elemIdx is the index of the maps or saved game to display on line 0 // elemIdx is the index of the maps or saved game to display on line 0
// slider->capacity contains the number of available screen lines // slider->capacity contains the number of available screen lines
// slider->positionsAmnt is the number of elements after filtering // slider->positionsAmnt is the number of elements after filtering
logGlobal->trace("updateListItems called, selectionPos: %d", selectionPos);
int elemIdx = slider->getValue(); int elemIdx = slider->getValue();
for(auto item : listItems) for(auto item : listItems)
{ {