summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-10 02:38:23 +0000
committerPeterN <peter@fuzzle.org>2019-03-10 10:31:37 +0000
commit9cb84a1bad7f9e126e19d7702e76b999be155054 (patch)
tree948e21259b37ff0d54ef04142fd9e70eb6d58071 /src
parent9c8b7b5efc9ff3dd065d5f02577de39161e2bee2 (diff)
downloadopenttd-9cb84a1bad7f9e126e19d7702e76b999be155054.tar.xz
Feature: Add road icon to road construction drop down list.
Diffstat (limited to 'src')
-rw-r--r--src/toolbar_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 69cad42ff..cff86c3b3 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -903,7 +903,7 @@ static CallBackFunction ToolbarBuildRoadClick(Window *w)
DropDownList *list = new DropDownList();
/* Road is always visible and available. */
- *list->Append() = new DropDownListStringItem(STR_ROAD_MENU_ROAD_CONSTRUCTION, ROADTYPE_ROAD, false);
+ *list->Append() = new DropDownListIconItem(SPR_IMG_ROAD_X_DIR, PAL_NONE, STR_ROAD_MENU_ROAD_CONSTRUCTION, ROADTYPE_ROAD, false);
/* Tram is only visible when there will be a tram, and available when that has been introduced. */
Engine *e;
@@ -911,7 +911,7 @@ static CallBackFunction ToolbarBuildRoadClick(Window *w)
if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue;
if (!HasBit(e->info.misc_flags, EF_ROAD_TRAM)) continue;
- *list->Append() = new DropDownListStringItem(STR_ROAD_MENU_TRAM_CONSTRUCTION, ROADTYPE_TRAM, !HasBit(c->avail_roadtypes, ROADTYPE_TRAM));
+ *list->Append() = new DropDownListIconItem(SPR_IMG_TRAMWAY_X_DIR, PAL_NONE, STR_ROAD_MENU_TRAM_CONSTRUCTION, ROADTYPE_TRAM, !HasBit(c->avail_roadtypes, ROADTYPE_TRAM));
break;
}
ShowDropDownList(w, list, _last_built_roadtype, WID_TN_ROADS, 140, true, true);