mirror of https://github.com/OpenTTD/OpenTTD
Remove: Unnecessary specialization of NewGRF preset list item.
parent
811bf22620
commit
303cfd86a3
|
@ -567,24 +567,6 @@ void ShowNewGRFTextfileWindow(TextfileType file_type, const GRFConfig *c)
|
|||
|
||||
static GRFPresetList _grf_preset_list; ///< List of known NewGRF presets. @see GetGRFPresetList
|
||||
|
||||
class DropDownListPresetItem : public DropDownListItem {
|
||||
public:
|
||||
DropDownListPresetItem(int result) : DropDownListItem(result, false) {}
|
||||
|
||||
virtual ~DropDownListPresetItem() {}
|
||||
|
||||
bool Selectable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const
|
||||
{
|
||||
DrawString(left + 2, right + 2, top, _grf_preset_list[this->result], sel ? TC_WHITE : TC_BLACK);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
typedef std::map<uint32, const GRFConfig *> GrfIdMap; ///< Map of grfid to the grf config.
|
||||
|
||||
/**
|
||||
|
@ -949,7 +931,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
|
|||
|
||||
for (uint i = 0; i < _grf_preset_list.Length(); i++) {
|
||||
if (_grf_preset_list[i] != NULL) {
|
||||
*list->Append() = new DropDownListPresetItem(i);
|
||||
*list->Append() = new DropDownListCharStringItem(_grf_preset_list[i], i, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue