Feature: Place cargo icon on cargo filter dropdowns.

Reveal the pixel art.
This commit is contained in:
Peter Nelson
2023-11-15 01:33:50 +00:00
committed by Peter Nelson
parent 76701c4622
commit 1aedea8eda
3 changed files with 8 additions and 4 deletions

View File

@@ -1579,8 +1579,9 @@ struct BuildVehicleWindow : Window {
}
/* Add cargos */
Dimension d = GetLargestCargoIconSize();
for (const CargoSpec *cs : _sorted_standard_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;