mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Remove unused code and no longer needed caching
This commit is contained in:
@@ -227,11 +227,8 @@ SelectionTab::SelectionTab(ESelectionScreen Type)
|
||||
buttonsSortBy.push_back(sortByDate);
|
||||
}
|
||||
|
||||
iconsMapFormats = GH.renderHandler().loadAnimation(AnimationPath::builtin("SCSELC.DEF"));
|
||||
iconsVictoryCondition = GH.renderHandler().loadAnimation(AnimationPath::builtin("SCNRVICT.DEF"));
|
||||
iconsLossCondition = GH.renderHandler().loadAnimation(AnimationPath::builtin("SCNRLOSS.DEF"));
|
||||
for(int i = 0; i < positionsToShow; i++)
|
||||
listItems.push_back(std::make_shared<ListItem>(Point(30, 129 + i * 25), iconsMapFormats, iconsVictoryCondition, iconsLossCondition));
|
||||
listItems.push_back(std::make_shared<ListItem>(Point(30, 129 + i * 25)));
|
||||
|
||||
labelTabTitle = std::make_shared<CLabel>(205, 28, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, tabTitle);
|
||||
slider = std::make_shared<CSlider>(Point(372, 86 + (enableUiEnhancements ? 30 : 0)), (tabType != ESelectionScreen::saveGame ? 480 : 430) - (enableUiEnhancements ? 30 : 0), std::bind(&SelectionTab::sliderMove, this, _1), positionsToShow, (int)curItems.size(), 0, Orientation::VERTICAL, CSlider::BLUE);
|
||||
@@ -883,7 +880,7 @@ std::unordered_set<ResourcePath> SelectionTab::getFiles(std::string dirURI, ERes
|
||||
return ret;
|
||||
}
|
||||
|
||||
SelectionTab::ListItem::ListItem(Point position, std::shared_ptr<CAnimation> iconsFormats, std::shared_ptr<CAnimation> iconsVictory, std::shared_ptr<CAnimation> iconsLoss)
|
||||
SelectionTab::ListItem::ListItem(Point position)
|
||||
: CIntObject(LCLICK, position)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||
@@ -898,9 +895,9 @@ SelectionTab::ListItem::ListItem(Point position, std::shared_ptr<CAnimation> ico
|
||||
labelMapSizeLetter->setAutoRedraw(false);
|
||||
// FIXME: This -12 should not be needed, but for some reason CAnimImage displaced otherwise
|
||||
iconFolder = std::make_shared<CPicture>(ImagePath::builtin("lobby/iconFolder.png"), -8, -12);
|
||||
iconFormat = std::make_shared<CAnimImage>(iconsFormats, 0, 0, 59, -12);
|
||||
iconVictoryCondition = std::make_shared<CAnimImage>(iconsVictory, 0, 0, 277, -12);
|
||||
iconLossCondition = std::make_shared<CAnimImage>(iconsLoss, 0, 0, 310, -12);
|
||||
iconFormat = std::make_shared<CAnimImage>(AnimationPath::builtin("SCSELC.DEF"), 0, 0, 59, -12);
|
||||
iconVictoryCondition = std::make_shared<CAnimImage>(AnimationPath::builtin("SCNRVICT.DEF"), 0, 0, 277, -12);
|
||||
iconLossCondition = std::make_shared<CAnimImage>(AnimationPath::builtin("SCNRLOSS.DEF"), 0, 0, 310, -12);
|
||||
}
|
||||
|
||||
void SelectionTab::ListItem::updateItem(std::shared_ptr<ElementInfo> info, bool selected)
|
||||
|
||||
Reference in New Issue
Block a user