Add: List 'Place object' in landscaping dropdown

This commit is contained in:
Tad Hardesty
2026-05-16 15:29:15 -07:00
committed by Richard Wheeler
parent a6db43ea59
commit ad87be3a6b
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -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
+6
View File
@@ -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;
}