summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_gui.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 23c037d10..4e66d2e52 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -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);
}
}