Feature: Place cargo icon on cargo filter dropdowns.
Reveal the pixel art.
This commit is contained in:

committed by
Peter Nelson

parent
76701c4622
commit
1aedea8eda
@@ -383,8 +383,9 @@ DropDownList BaseVehicleListWindow::BuildCargoDropDownList() const
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(this->GetCargoFilterLabel(CF_NONE), CF_NONE, false));
|
||||
|
||||
/* Add cargos */
|
||||
Dimension d = GetLargestCargoIconSize();
|
||||
for (const CargoSpec *cs : _sorted_cargo_specs) {
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(cs->name, cs->Index(), false));
|
||||
list.push_back(std::make_unique<DropDownListIconItem>(d, cs->GetCargoIcon(), PAL_NONE, cs->name, cs->Index(), false));
|
||||
}
|
||||
|
||||
return list;
|
||||
|
Reference in New Issue
Block a user