Changeset - r23446:6ee5c7b635a3
[Not reviewed]
master
0 1 0
peter1138 - 5 years ago 2019-03-10 02:38:23
peter1138@openttd.org
Feature: Add road icon to road construction drop down list.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/toolbar_gui.cpp
Show inline comments
 
@@ -903,7 +903,7 @@ static CallBackFunction ToolbarBuildRoad
 
	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 ToolbarBuildRoad
 
		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);
0 comments (0 inline, 0 general)