Changeset - r24007:2e59096d8a27
[Not reviewed]
master
0 1 0
glx - 5 years ago 2020-01-01 00:17:03
glx@openttd.org
Fix #7887: missing beep for some main toolbar buttons
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/toolbar_gui.cpp
Show inline comments
 
@@ -936,12 +936,13 @@ static CallBackFunction MenuClickBuildTr
 

	
 
static CallBackFunction ToolbarBuildWaterClick(Window *w)
 
{
 
	DropDownList list;
 
	list.emplace_back(new DropDownListIconItem(SPR_IMG_BUILD_CANAL, PAL_NONE, STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION, 0, false));
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_WATER, 140, true, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Waterways menu.
 
 *
 
@@ -958,12 +959,13 @@ static CallBackFunction MenuClickBuildWa
 

	
 
static CallBackFunction ToolbarBuildAirClick(Window *w)
 
{
 
	DropDownList list;
 
	list.emplace_back(new DropDownListIconItem(SPR_IMG_AIRPORT, PAL_NONE, STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION, 0, false));
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_AIR, 140, true, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Air menu.
 
 *
 
@@ -982,12 +984,13 @@ static CallBackFunction ToolbarForestCli
 
{
 
	DropDownList list;
 
	list.emplace_back(new DropDownListIconItem(SPR_IMG_LANDSCAPING, PAL_NONE, STR_LANDSCAPING_MENU_LANDSCAPING, 0, false));
 
	list.emplace_back(new DropDownListIconItem(SPR_IMG_PLANTTREES, PAL_NONE, STR_LANDSCAPING_MENU_PLANT_TREES, 1, false));
 
	list.emplace_back(new DropDownListIconItem(SPR_IMG_SIGN, PAL_NONE, STR_LANDSCAPING_MENU_PLACE_SIGN, 2, false));
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_LANDSCAPE, 100, true, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the landscaping menu.
 
 *
0 comments (0 inline, 0 general)