Change: Use CRTP-mixins to compose dropdown list items.
This allows list items to built from component parts as required, and additional functionality is added: * Icons and text can be positioned at the start or end of the space (templated.) * Font size of text can be changed (templated.) * Palette of sprites can be set (runtime.)
This commit is contained in:

committed by
Peter Nelson

parent
62e4d1e507
commit
49532914dd
@@ -358,7 +358,7 @@ static DropDownList BuildTownNameDropDown()
|
||||
size_t newgrf_size = list.size();
|
||||
/* Insert newgrf_names at the top of the list */
|
||||
if (newgrf_size > 0) {
|
||||
list.push_back(std::make_unique<DropDownListItem>(-1, false)); // separator line
|
||||
list.push_back(std::make_unique<DropDownListDividerItem>(-1, false)); // separator line
|
||||
newgrf_size++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user