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
@@ -224,7 +224,7 @@ struct GameOptionsWindow : Window {
|
||||
std::sort(list.begin(), list.end(), DropDownListStringItem::NatSortFunc);
|
||||
|
||||
/* Append custom currency at the end */
|
||||
list.push_back(std::make_unique<DropDownListItem>(-1, false)); // separator line
|
||||
list.push_back(std::make_unique<DropDownListDividerItem>(-1, false)); // separator line
|
||||
list.push_back(std::make_unique<DropDownListStringItem>(STR_GAME_OPTIONS_CURRENCY_CUSTOM, CURRENCY_CUSTOM, HasBit(disabled, CURRENCY_CUSTOM)));
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user