diff --git a/src/lang/english.txt b/src/lang/english.txt index e76e5d3d09..015c5d9bd3 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -525,6 +525,7 @@ STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Airport constru STR_LANDSCAPING_MENU_LANDSCAPING :Landscaping STR_LANDSCAPING_MENU_PLANT_TREES :Plant trees STR_LANDSCAPING_MENU_PLACE_SIGN :Place sign +STR_LANDSCAPING_MENU_PLACE_OBJECT :Place object # Music menu STR_TOOLBAR_SOUND_MUSIC :Sound/music diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index a65302197d..409802324e 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -25,6 +25,8 @@ #include "vehicle_func.h" #include "sound_func.h" #include "terraform_gui.h" +#include "object.h" +#include "newgrf_object.h" #include "strings_func.h" #include "company_func.h" #include "company_gui.h" @@ -998,6 +1000,9 @@ static CallBackFunction ToolbarForestClick(Window *w) list.push_back(MakeDropDownListIconItem(SPR_IMG_LANDSCAPING, PAL_NONE, STR_LANDSCAPING_MENU_LANDSCAPING, 0)); list.push_back(MakeDropDownListIconItem(SPR_IMG_PLANTTREES, PAL_NONE, STR_LANDSCAPING_MENU_PLANT_TREES, 1)); list.push_back(MakeDropDownListIconItem(SPR_IMG_SIGN, PAL_NONE, STR_LANDSCAPING_MENU_PLACE_SIGN, 2)); + if (ObjectClass::GetUIClassCount() != 0) { + list.push_back(MakeDropDownListIconItem(SPR_IMG_TRANSMITTER, PAL_NONE, STR_LANDSCAPING_MENU_PLACE_OBJECT, 3)); + } ShowDropDownList(w, std::move(list), 0, WID_TN_LANDSCAPE, 100, GetToolbarDropDownOptions()); return CallBackFunction::None; } @@ -1014,6 +1019,7 @@ static CallBackFunction MenuClickForest(int index) case 0: ShowTerraformToolbar(); break; case 1: ShowBuildTreesToolbar(); break; case 2: return SelectSignTool(); + case 3: ShowBuildObjectPicker(); break; } return CallBackFunction::None; }