Changeset - r27083:acaaba32287a
[Not reviewed]
master
0 10 0
Peter Nelson - 19 months ago 2023-04-11 19:07:50
peter1138@openttd.org
Change: Make all dropdown lists extend width if necessary.

This removes the auto_width parameter from ShowDropDown(At).
10 files changed with 32 insertions and 35 deletions:
0 comments (0 inline, 0 general)
src/game/game_gui.cpp
Show inline comments
 
@@ -311,13 +311,13 @@ struct GSConfigWindow : public Window {
 

	
 
							DropDownList list;
 
							for (int i = config_item.min_value; i <= config_item.max_value; i++) {
 
								list.emplace_back(new DropDownListCharStringItem(config_item.labels->Find(i)->second, i, false));
 
							}
 

	
 
							ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE, true);
 
							ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE);
 
						}
 
					}
 
				} else if (IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) {
 
					int new_val = old_val;
 
					if (bool_item) {
 
						new_val = !new_val;
src/industry_gui.cpp
Show inline comments
 
@@ -3075,13 +3075,13 @@ struct IndustryCargoesWindow : public Wi
 
				DropDownList lst;
 
				for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
 
					lst.emplace_back(new DropDownListStringItem(cs->name, cs->Index(), false));
 
				}
 
				if (!lst.empty()) {
 
					int selected = (this->ind_cargo >= NUM_INDUSTRYTYPES) ? (int)(this->ind_cargo - NUM_INDUSTRYTYPES) : -1;
 
					ShowDropDownList(this, std::move(lst), selected, WID_IC_CARGO_DROPDOWN, 0, true);
 
					ShowDropDownList(this, std::move(lst), selected, WID_IC_CARGO_DROPDOWN);
 
				}
 
				break;
 
			}
 

	
 
			case WID_IC_IND_DROPDOWN: {
 
				DropDownList lst;
 
@@ -3089,13 +3089,13 @@ struct IndustryCargoesWindow : public Wi
 
					const IndustrySpec *indsp = GetIndustrySpec(ind);
 
					if (!indsp->enabled) continue;
 
					lst.emplace_back(new DropDownListStringItem(indsp->name, ind, false));
 
				}
 
				if (!lst.empty()) {
 
					int selected = (this->ind_cargo < NUM_INDUSTRYTYPES) ? (int)this->ind_cargo : -1;
 
					ShowDropDownList(this, std::move(lst), selected, WID_IC_IND_DROPDOWN, 0, true);
 
					ShowDropDownList(this, std::move(lst), selected, WID_IC_IND_DROPDOWN);
 
				}
 
				break;
 
			}
 
		}
 
	}
 

	
src/music_gui.cpp
Show inline comments
 
@@ -574,13 +574,13 @@ struct MusicTrackSelectionWindow : publi
 
				_music.PlaylistRemove(y);
 
				break;
 
			}
 

	
 
			case WID_MTS_MUSICSET: {
 
				int selected = 0;
 
				ShowDropDownList(this, BuildMusicSetDropDownList(&selected), selected, widget, 0, true, false);
 
				ShowDropDownList(this, BuildMusicSetDropDownList(&selected), selected, widget);
 
				break;
 
			}
 

	
 
			case WID_MTS_CLEAR: // clear
 
				_music.PlaylistClear();
 
				break;
src/network/network_gui.cpp
Show inline comments
 
@@ -1568,13 +1568,13 @@ private:
 
		wi_rect.left   = pt.x;
 
		wi_rect.right  = pt.x;
 
		wi_rect.top    = pt.y;
 
		wi_rect.bottom = pt.y;
 

	
 
		w->dd_client_id = client_id;
 
		ShowDropDownListAt(w, std::move(list), -1, WID_CL_MATRIX, wi_rect, COLOUR_GREY, true, true);
 
		ShowDropDownListAt(w, std::move(list), -1, WID_CL_MATRIX, wi_rect, COLOUR_GREY, true);
 
	}
 

	
 
	/**
 
	 * Admin button on a Company is clicked.
 
	 * @param w The instance of this window.
 
	 * @param pt The point where this button was clicked.
 
@@ -1590,13 +1590,13 @@ private:
 
		wi_rect.left   = pt.x;
 
		wi_rect.right  = pt.x;
 
		wi_rect.top    = pt.y;
 
		wi_rect.bottom = pt.y;
 

	
 
		w->dd_company_id = company_id;
 
		ShowDropDownListAt(w, std::move(list), -1, WID_CL_MATRIX, wi_rect, COLOUR_GREY, true, true);
 
		ShowDropDownListAt(w, std::move(list), -1, WID_CL_MATRIX, wi_rect, COLOUR_GREY, true);
 
	}
 
	/**
 
	 * Chat button on a Client is clicked.
 
	 * @param w The instance of this window.
 
	 * @param pt The point where this button was clicked.
 
	 * @param client_id The client this button was assigned to.
src/newgrf_gui.cpp
Show inline comments
 
@@ -379,13 +379,13 @@ struct NewGRFParametersWindow : public W
 

	
 
							DropDownList list;
 
							for (uint32 i = par_info->min_value; i <= par_info->max_value; i++) {
 
								list.emplace_back(new DropDownListCharStringItem(GetGRFStringFromGRFText(par_info->value_names.Find(i)->second), i, false));
 
							}
 

	
 
							ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE, true);
 
							ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE);
 
						}
 
					}
 
				} else if (IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) {
 
					uint32 val = old_val;
 
					if (par_info->type == PTYPE_BOOL) {
 
						val = !val;
src/script/script_gui.cpp
Show inline comments
 
@@ -474,13 +474,13 @@ struct ScriptSettingsWindow : public Win
 

	
 
							DropDownList list;
 
							for (int i = config_item.min_value; i <= config_item.max_value; i++) {
 
								list.emplace_back(new DropDownListCharStringItem(config_item.labels->Find(i)->second, i, false));
 
							}
 

	
 
							ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE, true);
 
							ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE);
 
						}
 
					}
 
				} else if (IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) {
 
					int new_val = old_val;
 
					if (bool_item) {
 
						new_val = !new_val;
src/settings_gui.cpp
Show inline comments
 
@@ -2254,13 +2254,13 @@ struct GameSettingsWindow : Window {
 

	
 
					DropDownList list;
 
					for (int i = sd->min; i <= (int)sd->max; i++) {
 
						list.emplace_back(new DropDownListStringItem(sd->str_val + i - sd->min, i, false));
 
					}
 

	
 
					ShowDropDownListAt(this, std::move(list), value, -1, wi_rect, COLOUR_ORANGE, true);
 
					ShowDropDownListAt(this, std::move(list), value, -1, wi_rect, COLOUR_ORANGE);
 
				}
 
			}
 
			this->SetDirty();
 
		} else if (x < SETTING_BUTTON_WIDTH) {
 
			this->SetDisplayedHelpText(pe);
 
			int32 oldvalue = value;
src/toolbar_gui.cpp
Show inline comments
 
@@ -187,13 +187,13 @@ public:
 
 * @param widget Toolbar button
 
 * @param list List of items
 
 * @param def Default item
 
 */
 
static void PopupMainToolbMenu(Window *w, int widget, DropDownList &&list, int def)
 
{
 
	ShowDropDownList(w, std::move(list), def, widget, 0, true, true);
 
	ShowDropDownList(w, std::move(list), def, widget, 0, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
}
 

	
 
/**
 
 * Pop up a generic text only menu.
 
 * @param w Toolbar
 
@@ -341,13 +341,13 @@ static CallBackFunction ToolbarOptionsCl
 
	list.emplace_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_SHOW_COMPETITOR_SIGNS,   OME_SHOW_COMPETITOR_SIGNS, false, HasBit(_display_opt, DO_SHOW_COMPETITOR_SIGNS)));
 
	list.emplace_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_FULL_ANIMATION,          OME_FULL_ANIMATION, false, HasBit(_display_opt, DO_FULL_ANIMATION)));
 
	list.emplace_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_FULL_DETAIL,             OME_FULL_DETAILS, false, HasBit(_display_opt, DO_FULL_DETAIL)));
 
	list.emplace_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_TRANSPARENT_BUILDINGS,   OME_TRANSPARENTBUILDINGS, false, IsTransparencySet(TO_HOUSES)));
 
	list.emplace_back(new DropDownListCheckedItem(STR_SETTINGS_MENU_TRANSPARENT_SIGNS,       OME_SHOW_STATIONSIGNS, false, IsTransparencySet(TO_SIGNS)));
 

	
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_SETTINGS, 140, true, true);
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_SETTINGS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on one of the entries in the Options button menu.
 
@@ -712,26 +712,26 @@ static CallBackFunction ToolbarGraphsCli
 
	list.emplace_back(new DropDownListStringItem(STR_GRAPH_MENU_PERFORMANCE_HISTORY_GRAPH, GRMN_PERFORMANCE_HISTORY_GRAPH, false));
 
	list.emplace_back(new DropDownListStringItem(STR_GRAPH_MENU_COMPANY_VALUE_GRAPH, GRMN_COMPANY_VALUE_GRAPH, false));
 
	list.emplace_back(new DropDownListStringItem(STR_GRAPH_MENU_CARGO_PAYMENT_RATES, GRMN_CARGO_PAYMENT_RATES, false));
 

	
 
	if (_toolbar_mode != TB_NORMAL) AddDropDownLeagueTableOptions(list);
 

	
 
	ShowDropDownList(w, std::move(list), GRMN_OPERATING_PROFIT_GRAPH, WID_TN_GRAPHS, 140, true, true);
 
	ShowDropDownList(w, std::move(list), GRMN_OPERATING_PROFIT_GRAPH, WID_TN_GRAPHS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 

	
 
	return CBF_NONE;
 
}
 

	
 
static CallBackFunction ToolbarLeagueClick(Window *w)
 
{
 
	DropDownList list;
 

	
 
	AddDropDownLeagueTableOptions(list);
 

	
 
	int selected = list[0]->result;
 
	ShowDropDownList(w, std::move(list), selected, WID_TN_LEAGUE, 140, true, true);
 
	ShowDropDownList(w, std::move(list), selected, WID_TN_LEAGUE, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 

	
 
	return CBF_NONE;
 
}
 

	
 
/**
 
@@ -902,13 +902,13 @@ static CallBackFunction ToolbarZoomOutCl
 
}
 

	
 
/* --- Rail button menu --- */
 

	
 
static CallBackFunction ToolbarBuildRailClick(Window *w)
 
{
 
	ShowDropDownList(w, GetRailTypeDropDownList(), _last_built_railtype, WID_TN_RAILS, 140, true, true);
 
	ShowDropDownList(w, GetRailTypeDropDownList(), _last_built_railtype, WID_TN_RAILS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Rail menu.
 
@@ -924,13 +924,13 @@ static CallBackFunction MenuClickBuildRa
 
}
 

	
 
/* --- Road button menu --- */
 

	
 
static CallBackFunction ToolbarBuildRoadClick(Window *w)
 
{
 
	ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TN_ROADS, 140, true, true);
 
	ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TN_ROADS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Road menu.
 
@@ -946,13 +946,13 @@ static CallBackFunction MenuClickBuildRo
 
}
 

	
 
/* --- Tram button menu --- */
 

	
 
static CallBackFunction ToolbarBuildTramClick(Window *w)
 
{
 
	ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TN_TRAMS, 140, true, true);
 
	ShowDropDownList(w, GetRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TN_TRAMS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Tram menu.
 
@@ -970,13 +970,13 @@ static CallBackFunction MenuClickBuildTr
 
/* --- Water button menu --- */
 

	
 
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);
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_WATER, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Waterways menu.
 
@@ -993,13 +993,13 @@ static CallBackFunction MenuClickBuildWa
 
/* --- Airport button menu --- */
 

	
 
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);
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_AIR, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Air menu.
 
@@ -1018,13 +1018,13 @@ static CallBackFunction MenuClickBuildAi
 
static CallBackFunction ToolbarForestClick(Window *w)
 
{
 
	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);
 
	ShowDropDownList(w, std::move(list), 0, WID_TN_LANDSCAPE, 100, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the landscaping menu.
 
@@ -1252,13 +1252,13 @@ static CallBackFunction ToolbarScenGenIn
 
	ShowBuildIndustryWindow();
 
	return CBF_NONE;
 
}
 

	
 
static CallBackFunction ToolbarScenBuildRoadClick(Window *w)
 
{
 
	ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TE_ROADS, 140, true, true);
 
	ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_ROAD), _last_built_roadtype, WID_TE_ROADS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Road menu.
 
@@ -1272,13 +1272,13 @@ static CallBackFunction ToolbarScenBuild
 
	ShowBuildRoadScenToolbar(_last_built_roadtype);
 
	return CBF_NONE;
 
}
 

	
 
static CallBackFunction ToolbarScenBuildTramClick(Window *w)
 
{
 
	ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TE_TRAMS, 140, true, true);
 
	ShowDropDownList(w, GetScenRoadTypeDropDownList(RTTB_TRAM), _last_built_tramtype, WID_TE_TRAMS, 140, true);
 
	if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Build Tram menu.
src/widgets/dropdown.cpp
Show inline comments
 
@@ -348,39 +348,37 @@ struct DropdownWindow : Window {
 
 * @param w        Parent window for the list.
 
 * @param list     Prepopulated DropDownList.
 
 * @param selected The initially selected list item.
 
 * @param button   The widget which is passed to Window::OnDropdownSelect and OnDropdownClose.
 
 *                 Unless you override those functions, this should be then widget index of the dropdown button.
 
 * @param wi_rect  Coord of the parent drop down button, used to position the dropdown menu.
 
 * @param auto_width The width is determined by the widest item in the list,
 
 *                   in this case only one of \a left or \a right is used (depending on text direction).
 
 * @param instant_close Set to true if releasing mouse button should close the
 
 *                      list regardless of where the cursor is.
 
 */
 
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width, bool instant_close)
 
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool instant_close)
 
{
 
	CloseWindowById(WC_DROPDOWN_MENU, 0);
 

	
 
	/* The preferred position is just below the dropdown calling widget */
 
	int top = w->top + wi_rect.bottom + 1;
 

	
 
	/* The preferred width equals the calling widget */
 
	uint width = wi_rect.Width();
 

	
 
	/* Longest item in the list, if auto_width is enabled */
 
	/* Longest item in the list */
 
	uint max_item_width = 0;
 

	
 
	/* Total height of list */
 
	uint height = 0;
 

	
 
	for (const auto &item : list) {
 
		height += item->Height(width);
 
		if (auto_width) max_item_width = std::max(max_item_width, item->Width());
 
		max_item_width = std::max(max_item_width, item->Width());
 
	}
 

	
 
	if (auto_width) max_item_width += WidgetDimensions::scaled.fullbevel.Horizontal();
 
	max_item_width += WidgetDimensions::scaled.fullbevel.Horizontal();
 

	
 
	/* Scrollbar needed? */
 
	bool scroll = false;
 

	
 
	/* Is it better to place the dropdown above the widget? */
 
	bool above = false;
 
@@ -418,13 +416,13 @@ void ShowDropDownListAt(Window *w, DropD
 
		/* Set the top position if needed. */
 
		if (above) {
 
			top = w->top + wi_rect.top - height - WidgetDimensions::scaled.fullbevel.Vertical() * 2;
 
		}
 
	}
 

	
 
	if (auto_width) width = std::max(width, max_item_width);
 
	width = std::max(width, max_item_width);
 

	
 
	Point dw_pos = { w->left + (_current_text_dir == TD_RTL ? wi_rect.right + 1 - (int)width : wi_rect.left), top};
 
	Dimension dw_size = {width, height};
 
	DropdownWindow *dropdown = new DropdownWindow(w, std::move(list), selected, button, instant_close, dw_pos, dw_size, wi_colour, scroll);
 

	
 
	/* The dropdown starts scrolling downwards when opening it towards
 
@@ -437,18 +435,17 @@ void ShowDropDownListAt(Window *w, DropD
 
 * Show a drop down list.
 
 * @param w        Parent window for the list.
 
 * @param list     Prepopulated DropDownList.
 
 * @param selected The initially selected list item.
 
 * @param button   The widget within the parent window that is used to determine
 
 *                 the list's location.
 
 * @param width    Override the width determined by the selected widget.
 
 * @param auto_width Maximum width is determined by the widest item in the list.
 
 * @param width    Override the minimum width determined by the selected widget and list contents.
 
 * @param instant_close Set to true if releasing mouse button should close the
 
 *                      list regardless of where the cursor is.
 
 */
 
void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width, bool auto_width, bool instant_close)
 
void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width, bool instant_close)
 
{
 
	/* Our parent's button widget is used to determine where to place the drop
 
	 * down list window. */
 
	NWidgetCore *nwi = w->GetWidget<NWidgetCore>(button);
 
	Rect wi_rect      = nwi->GetCurrentRect();
 
	Colours wi_colour = nwi->colour;
 
@@ -465,25 +462,25 @@ void ShowDropDownList(Window *w, DropDow
 
			wi_rect.left = wi_rect.right + 1 - ScaleGUITrad(width);
 
		} else {
 
			wi_rect.right = wi_rect.left + ScaleGUITrad(width) - 1;
 
		}
 
	}
 

	
 
	ShowDropDownListAt(w, std::move(list), selected, button, wi_rect, wi_colour, auto_width, instant_close);
 
	ShowDropDownListAt(w, std::move(list), selected, button, wi_rect, wi_colour, instant_close);
 
}
 

	
 
/**
 
 * Show a dropdown menu window near a widget of the parent window.
 
 * The result code of the items is their index in the \a strings list.
 
 * @param w             Parent window that wants the dropdown menu.
 
 * @param strings       Menu list, end with #INVALID_STRING_ID
 
 * @param selected      Index of initial selected item.
 
 * @param button        Button widget number of the parent window \a w that wants the dropdown menu.
 
 * @param disabled_mask Bitmask for disabled items (items with their bit set are displayed, but not selectable in the dropdown list).
 
 * @param hidden_mask   Bitmask for hidden items (items with their bit set are not copied to the dropdown list).
 
 * @param width         Width of the dropdown menu. If \c 0, use the width of parent widget \a button.
 
 * @param width         Minimum width of the dropdown menu.
 
 */
 
void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width)
 
{
 
	DropDownList list;
 

	
 
	for (uint i = 0; strings[i] != INVALID_STRING_ID; i++) {
src/widgets/dropdown_type.h
Show inline comments
 
@@ -95,11 +95,11 @@ public:
 

	
 
/**
 
 * A drop down list is a collection of drop down list items.
 
 */
 
typedef std::vector<std::unique_ptr<const DropDownListItem>> DropDownList;
 

	
 
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width = false, bool instant_close = false);
 
void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool instant_close = false);
 

	
 
void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width = 0, bool auto_width = false, bool instant_close = false);
 
void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width = 0, bool instant_close = false);
 

	
 
#endif /* WIDGETS_DROPDOWN_TYPE_H */
0 comments (0 inline, 0 general)