Changeset - r13554:d1964ead02ee
src/ai/ai_gui.cpp
Show inline comments
 
@@ -233,13 +233,13 @@ static const NWidgetPart _nested_ai_list
 

	
 
/* Window definition for the ai list window. */
 
static const WindowDesc _ai_list_desc(
 
	WDP_CENTER, WDP_CENTER, 200, 234, 200, 234,
 
	WC_AI_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_ai_list_widgets, lengthof(_nested_ai_list_widgets)
 
	_nested_ai_list_widgets, lengthof(_nested_ai_list_widgets)
 
);
 

	
 
static void ShowAIListWindow(CompanyID slot)
 
{
 
	DeleteWindowByClass(WC_AI_LIST);
 
	new AIListWindow(&_ai_list_desc, slot);
 
@@ -432,13 +432,13 @@ static const NWidgetPart _nested_ai_sett
 

	
 
/* Window definition for the AI settings window. */
 
static const WindowDesc _ai_settings_desc(
 
	WDP_CENTER, WDP_CENTER, 200, 208, 500, 208,
 
	WC_AI_SETTINGS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_ai_settings_widgets, lengthof(_nested_ai_settings_widgets)
 
	_nested_ai_settings_widgets, lengthof(_nested_ai_settings_widgets)
 
);
 

	
 
static void ShowAISettingsWindow(CompanyID slot)
 
{
 
	DeleteWindowByClass(WC_AI_LIST);
 
	DeleteWindowByClass(WC_AI_SETTINGS);
 
@@ -481,13 +481,13 @@ static const NWidgetPart _nested_ai_conf
 

	
 
/* Window definition for the configure AI window. */
 
static const WindowDesc _ai_config_desc(
 
	WDP_CENTER, WDP_CENTER, 300, 172, 300, 172,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_ai_config_widgets, lengthof(_nested_ai_config_widgets)
 
	_nested_ai_config_widgets, lengthof(_nested_ai_config_widgets)
 
);
 

	
 
/**
 
 * Window to configure which AIs will start.
 
 */
 
struct AIConfigWindow : public Window {
 
@@ -949,13 +949,13 @@ static const NWidgetPart _nested_ai_debu
 
};
 

	
 
static const WindowDesc _ai_debug_desc(
 
	WDP_AUTO, WDP_AUTO, 299, 241, 299, 241,
 
	WC_AI_DEBUG, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_ai_debug_widgets, lengthof(_nested_ai_debug_widgets)
 
	_nested_ai_debug_widgets, lengthof(_nested_ai_debug_widgets)
 
);
 

	
 
void ShowAIDebugWindow(CompanyID show_company)
 
{
 
	if (!_networking || _network_server) {
 
		AIDebugWindow *w = (AIDebugWindow *)BringWindowToFrontById(WC_AI_DEBUG, 0);
src/airport_gui.cpp
Show inline comments
 
@@ -151,13 +151,13 @@ static const NWidgetPart _nested_air_too
 
};
 

	
 
static const WindowDesc _air_toolbar_desc(
 
	WDP_ALIGN_TBR, 22, 64, 36, 64, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_air_toolbar_widgets, lengthof(_nested_air_toolbar_widgets)
 
	_nested_air_toolbar_widgets, lengthof(_nested_air_toolbar_widgets)
 
);
 

	
 
void ShowBuildAirToolbar()
 
{
 
	if (!Company::IsValidID(_local_company)) return;
 

	
 
@@ -384,13 +384,13 @@ static const NWidgetPart _nested_build_a
 
};
 

	
 
static const WindowDesc _build_airport_desc(
 
	WDP_AUTO, WDP_AUTO, 148, 245, 148, 245,
 
	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_airport_widgets, lengthof(_nested_build_airport_widgets)
 
	_nested_build_airport_widgets, lengthof(_nested_build_airport_widgets)
 
);
 

	
 
static void ShowBuildAirportPicker(Window *parent)
 
{
 
	new AirportPickerWindow(&_build_airport_desc, parent);
 
}
src/autoreplace_gui.cpp
Show inline comments
 
@@ -525,13 +525,13 @@ static const NWidgetPart _nested_replace
 
};
 

	
 
static const WindowDesc _replace_rail_vehicle_desc(
 
	WDP_AUTO, WDP_AUTO, 456, 140, 456, 140,
 
	WC_REPLACE_VEHICLE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_replace_rail_vehicle_widgets, lengthof(_nested_replace_rail_vehicle_widgets)
 
	_nested_replace_rail_vehicle_widgets, lengthof(_nested_replace_rail_vehicle_widgets)
 
);
 

	
 
static const NWidgetPart _nested_replace_vehicle_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY, RVW_WIDGET_CLOSEBOX),
 
		NWidget(WWT_CAPTION, COLOUR_GREY, RVW_WIDGET_CAPTION), SetMinimalSize(433, 14), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
 
@@ -556,13 +556,13 @@ static const NWidgetPart _nested_replace
 
};
 

	
 
static const WindowDesc _replace_vehicle_desc(
 
	WDP_AUTO, WDP_AUTO, 456, 118, 456, 118,
 
	WC_REPLACE_VEHICLE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_replace_vehicle_widgets, lengthof(_nested_replace_vehicle_widgets)
 
	_nested_replace_vehicle_widgets, lengthof(_nested_replace_vehicle_widgets)
 
);
 

	
 
void ShowReplaceGroupVehicleWindow(GroupID id_g, VehicleType vehicletype)
 
{
 
	DeleteWindowById(WC_REPLACE_VEHICLE, vehicletype);
 
	new ReplaceVehicleWindow(vehicletype == VEH_TRAIN ? &_replace_rail_vehicle_desc : &_replace_vehicle_desc, vehicletype, id_g);
src/bridge_gui.cpp
Show inline comments
 
@@ -339,13 +339,13 @@ static const NWidgetPart _nested_build_b
 

	
 
/* Window definition for the rail bridge selection window */
 
static const WindowDesc _build_bridge_desc(
 
	WDP_AUTO, WDP_AUTO, 200, 114, 200, 114,
 
	WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_build_bridge_widgets, lengthof(_nested_build_bridge_widgets)
 
	_nested_build_bridge_widgets, lengthof(_nested_build_bridge_widgets)
 
);
 

	
 
/**
 
 * Prepare the data for the build a bridge window.
 
 *  If we can't build a bridge under the given conditions
 
 *  show an error message.
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1184,13 +1184,13 @@ struct BuildVehicleWindow : Window {
 
};
 

	
 
static const WindowDesc _build_vehicle_desc(
 
	WDP_AUTO, WDP_AUTO, 240, 186, 240, 268,
 
	WC_BUILD_VEHICLE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets)
 
	_nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets)
 
);
 

	
 
void ShowBuildVehicleWindow(TileIndex tile, VehicleType type)
 
{
 
	/* We want to be able to open both Available Train as Available Ships,
 
	 *  so if tile == INVALID_TILE (Available XXX Window), use 'type' as unique number.
src/cheat_gui.cpp
Show inline comments
 
@@ -308,13 +308,13 @@ struct CheatWindow : Window {
 
};
 

	
 
static const WindowDesc _cheats_desc(
 
	240, 22, 0, 0, 0, 0,
 
	WC_CHEATS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_cheat_widgets, lengthof(_nested_cheat_widgets)
 
	_nested_cheat_widgets, lengthof(_nested_cheat_widgets)
 
);
 

	
 

	
 
void ShowCheatWindow()
 
{
 
	DeleteWindowById(WC_CHEATS, 0);
src/company_gui.cpp
Show inline comments
 
@@ -458,13 +458,13 @@ struct CompanyFinancesWindow : Window {
 
};
 

	
 
static const WindowDesc _company_finances_desc(
 
	WDP_AUTO, WDP_AUTO, 0, 0, 0, 0,
 
	WC_FINANCES, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	NULL, _nested_company_finances_widgets, lengthof(_nested_company_finances_widgets)
 
	_nested_company_finances_widgets, lengthof(_nested_company_finances_widgets)
 
);
 

	
 
/** Open the finances window of a company.
 
 * @param company Company to show finances of.
 
 * @pre is company a valid company.
 
 */
 
@@ -798,13 +798,13 @@ static const NWidgetPart _nested_select_
 
};
 

	
 
static const WindowDesc _select_company_livery_desc(
 
	WDP_AUTO, WDP_AUTO, 0, 0, 0, 0,
 
	WC_COMPANY_COLOUR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_select_company_livery_widgets, lengthof(_nested_select_company_livery_widgets)
 
	_nested_select_company_livery_widgets, lengthof(_nested_select_company_livery_widgets)
 
);
 

	
 
/**
 
 * Draws the face of a company manager's face.
 
 * @param cmf   the company manager's face
 
 * @param colour the (background) colour of the gradient
 
@@ -1379,21 +1379,21 @@ public:
 

	
 
/** normal/simple company manager face selection window description */
 
static const WindowDesc _select_company_manager_face_desc(
 
	WDP_AUTO, WDP_AUTO, 190, 163, 190, 163,
 
	WC_COMPANY_MANAGER_FACE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
 
	NULL, _nested_select_company_manager_face_widgets, lengthof(_nested_select_company_manager_face_widgets)
 
	_nested_select_company_manager_face_widgets, lengthof(_nested_select_company_manager_face_widgets)
 
);
 

	
 
/** advanced company manager face selection window description */
 
static const WindowDesc _select_company_manager_face_adv_desc(
 
	WDP_AUTO, WDP_AUTO, 220, 220, 220, 220,
 
	WC_COMPANY_MANAGER_FACE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
 
	NULL, _nested_select_company_manager_face_adv_widgets, lengthof(_nested_select_company_manager_face_adv_widgets)
 
	_nested_select_company_manager_face_adv_widgets, lengthof(_nested_select_company_manager_face_adv_widgets)
 
);
 

	
 
/**
 
 * Open the simple/advanced company manager face selection window
 
 *
 
 * @param parent the parent company window
 
@@ -1424,29 +1424,12 @@ enum CompanyWindowWidgets {
 
	CW_WIDGET_BUY_SHARE,
 
	CW_WIDGET_SELL_SHARE,
 
	CW_WIDGET_COMPANY_PASSWORD,
 
	CW_WIDGET_COMPANY_JOIN,
 
};
 

	
 
static const Widget _company_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_GREY,     0,    10,     0,    13, STR_BLACK_CROSS,                        STR_TOOLTIP_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   359,     0,    13, STR_COMPANY_VIEW_CAPTION,               STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   359,    14,   157, 0x0,                                    STR_NULL},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,     0,    89,   158,   169, STR_COMPANY_VIEW_NEW_FACE_BUTTON,       STR_COMPANY_VIEW_NEW_FACE_TOOLTIP},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,    90,   179,   158,   169, STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON,  STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   180,   269,   158,   169, STR_COMPANY_VIEW_PRESIDENT_NAME_BUTTON, STR_COMPANY_VIEW_PRESIDENT_NAME_TOOLTIP},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   270,   359,   158,   169, STR_COMPANY_VIEW_COMPANY_NAME_BUTTON,   STR_COMPANY_VIEW_COMPANY_NAME_TOOLTIP},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,   266,   355,    18,    29, STR_COMPANY_VIEW_VIEW_HQ_BUTTON,        STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,   266,   355,    32,    43, STR_COMPANY_VIEW_RELOCATE_HQ,                        STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,     0,   179,   158,   169, STR_COMPANY_VIEW_BUY_SHARE_BUTTON,      STR_COMPANY_VIEW_BUY_SHARE_TOOLTIP},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   180,   359,   158,   169, STR_COMPANY_VIEW_SELL_SHARE_BUTTON,     STR_COMPANY_VIEW_SELL_SHARE_TOOLTIP},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   266,   355,   138,   149, STR_COMPANY_VIEW_PASSWORD,                   STR_COMPANY_VIEW_PASSWORD_TOOLTIP},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   266,   355,   138,   149, STR_COMPANY_VIEW_JOIN,                       STR_COMPANY_VIEW_JOIN_TOOLTIP},
 
{   WIDGETS_END},
 
};
 

	
 
static const NWidgetPart _nested_company_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY, CW_WIDGET_CLOSEBOX),
 
		NWidget(WWT_CAPTION, COLOUR_GREY, CW_WIDGET_CAPTION), SetDataTip(STR_COMPANY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
 
	EndContainer(),
 
	NWidget(WWT_PANEL, COLOUR_GREY, CW_WIDGET_FACE),
 
@@ -1781,13 +1764,13 @@ struct CompanyWindow : Window
 
};
 

	
 
static const WindowDesc _company_desc(
 
	WDP_AUTO, WDP_AUTO, 360, 170, 360, 170,
 
	WC_COMPANY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	_company_widgets, _nested_company_widgets,lengthof(_nested_company_widgets)
 
	_nested_company_widgets, lengthof(_nested_company_widgets)
 
);
 

	
 
void ShowCompany(CompanyID company)
 
{
 
	if (!Company::IsValidID(company)) return;
 

	
 
@@ -1893,13 +1876,13 @@ static const NWidgetPart _nested_buy_com
 
};
 

	
 
static const WindowDesc _buy_company_desc(
 
	153, 171, 334, 137, 334, 137,
 
	WC_BUY_COMPANY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_buy_company_widgets, lengthof(_nested_buy_company_widgets)
 
	_nested_buy_company_widgets, lengthof(_nested_buy_company_widgets)
 
);
 

	
 

	
 
void ShowBuyCompanyDialog(CompanyID company)
 
{
 
	AllocateWindowDescFront<BuyCompanyWindow>(&_buy_company_desc, company);
src/console_gui.cpp
Show inline comments
 
@@ -158,13 +158,13 @@ static const struct NWidgetPart _nested_
 
};
 

	
 
static const WindowDesc _console_window_desc(
 
	0, 0, 0, 0, 0, 0,
 
	WC_CONSOLE, WC_NONE,
 
	0,
 
	NULL, _nested_console_window_widgets, lengthof(_nested_console_window_widgets)
 
	_nested_console_window_widgets, lengthof(_nested_console_window_widgets)
 
);
 

	
 
struct IConsoleWindow : Window
 
{
 
	static int scroll;
 
	int line_height;
src/depot_gui.cpp
Show inline comments
 
@@ -92,34 +92,34 @@ static const NWidgetPart _nested_train_d
 
};
 

	
 
static const WindowDesc _train_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 36, 27, 362, 123,
 
	WC_VEHICLE_DEPOT, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
	_nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
);
 

	
 
static const WindowDesc _road_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 36, 27, 316, 97,
 
	WC_VEHICLE_DEPOT, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
	_nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
);
 

	
 
static const WindowDesc _ship_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 36, 27, 306, 99,
 
	WC_VEHICLE_DEPOT, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
	_nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
);
 

	
 
static const WindowDesc _aircraft_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 36, 27, 332, 99,
 
	WC_VEHICLE_DEPOT, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
	_nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)
 
);
 

	
 
extern void DepotSortList(VehicleList *list);
 

	
 
/**
 
 * This is the Callback method after the cloning attempt of a vehicle
src/dock_gui.cpp
Show inline comments
 
@@ -285,13 +285,13 @@ static const NWidgetPart _nested_build_d
 
};
 

	
 
static const WindowDesc _build_docks_toolbar_desc(
 
	WDP_ALIGN_TBR, 22, 160, 36, 160, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_build_docks_toolbar_widgets, lengthof(_nested_build_docks_toolbar_widgets)
 
	_nested_build_docks_toolbar_widgets, lengthof(_nested_build_docks_toolbar_widgets)
 
);
 

	
 
void ShowBuildDocksToolbar()
 
{
 
	if (!Company::IsValidID(_local_company)) return;
 

	
 
@@ -321,13 +321,13 @@ static const NWidgetPart _nested_build_d
 

	
 
/** Window definition for the build docks in scenario editor window. */
 
static const WindowDesc _build_docks_scen_toolbar_desc(
 
	WDP_AUTO, WDP_AUTO, 115, 36, 115, 36,
 
	WC_SCEN_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets)
 
	_nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets)
 
);
 

	
 
void ShowBuildDocksScenToolbar()
 
{
 
	AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
 
}
 
@@ -418,13 +418,13 @@ static const NWidgetPart _nested_build_d
 
};
 

	
 
static const WindowDesc _build_dock_station_desc(
 
	WDP_AUTO, WDP_AUTO, 148, 75, 148, 75,
 
	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_dock_station_widgets, lengthof(_nested_build_dock_station_widgets)
 
	_nested_build_dock_station_widgets, lengthof(_nested_build_dock_station_widgets)
 
);
 

	
 
static void ShowBuildDockStationPicker(Window *parent)
 
{
 
	new BuildDocksStationWindow(&_build_dock_station_desc, parent);
 
}
 
@@ -504,13 +504,13 @@ static const NWidgetPart _nested_build_d
 
};
 

	
 
static const WindowDesc _build_docks_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 204, 86, 204, 86,
 
	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_docks_depot_widgets, lengthof(_nested_build_docks_depot_widgets)
 
	_nested_build_docks_depot_widgets, lengthof(_nested_build_docks_depot_widgets)
 
);
 

	
 

	
 
static void ShowBuildDocksDepotPicker(Window *parent)
 
{
 
	new BuildDocksDepotWindow(&_build_docks_depot_desc, parent);
src/engine_gui.cpp
Show inline comments
 
@@ -124,13 +124,13 @@ struct EnginePreviewWindow : Window {
 
};
 

	
 
static const WindowDesc _engine_preview_desc(
 
	WDP_CENTER, WDP_CENTER, 300, 192, 300, 192,
 
	WC_ENGINE_PREVIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_engine_preview_widgets, lengthof(_nested_engine_preview_widgets)
 
	_nested_engine_preview_widgets, lengthof(_nested_engine_preview_widgets)
 
);
 

	
 

	
 
void ShowEnginePreviewWindow(EngineID engine)
 
{
 
	AllocateWindowDescFront<EnginePreviewWindow>(&_engine_preview_desc, engine);
src/genworld_gui.cpp
Show inline comments
 
@@ -762,20 +762,20 @@ struct GenerateLandscapeWindow : public 
 
};
 

	
 
static const WindowDesc _generate_landscape_desc(
 
	WDP_CENTER, WDP_CENTER, 338, 313, 338, 313,
 
	WC_GENERATE_LANDSCAPE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_generate_landscape_widgets, lengthof(_nested_generate_landscape_widgets)
 
	_nested_generate_landscape_widgets, lengthof(_nested_generate_landscape_widgets)
 
);
 

	
 
static const WindowDesc _heightmap_load_desc(
 
	WDP_CENTER, WDP_CENTER, 338, 236, 338, 236,
 
	WC_GENERATE_LANDSCAPE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_heightmap_load_widgets, lengthof(_nested_heightmap_load_widgets)
 
	_nested_heightmap_load_widgets, lengthof(_nested_heightmap_load_widgets)
 
);
 

	
 
static void _ShowGenerateLandscape(glwp_modes mode)
 
{
 
	uint x = 0;
 
	uint y = 0;
 
@@ -1071,13 +1071,13 @@ static const NWidgetPart _nested_create_
 
};
 

	
 
static const WindowDesc _create_scenario_desc(
 
	WDP_CENTER, WDP_CENTER, 338, 170, 338, 170,
 
	WC_GENERATE_LANDSCAPE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_create_scenario_widgets, lengthof(_nested_create_scenario_widgets)
 
	_nested_create_scenario_widgets, lengthof(_nested_create_scenario_widgets)
 
);
 

	
 
void ShowCreateScenario()
 
{
 
	DeleteWindowByClass(WC_GENERATE_LANDSCAPE);
 
	new CreateScenarioWindow(&_create_scenario_desc, GLWP_SCENARIO);
 
@@ -1106,13 +1106,13 @@ static const NWidgetPart _nested_generat
 

	
 

	
 
static const WindowDesc _generate_progress_desc(
 
	WDP_CENTER, WDP_CENTER, 181, 97, 181, 97,
 
	WC_GENERATE_PROGRESS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_generate_progress_widgets, lengthof(_nested_generate_progress_widgets)
 
	_nested_generate_progress_widgets, lengthof(_nested_generate_progress_widgets)
 
);
 

	
 
struct tp_info {
 
	uint percent;
 
	StringID cls;
 
	uint current;
src/graph_gui.cpp
Show inline comments
 
@@ -140,13 +140,13 @@ static const NWidgetPart _nested_graph_l
 
};
 

	
 
static const WindowDesc _graph_legend_desc(
 
	WDP_AUTO, WDP_AUTO, 250, 196, 250, 196,
 
	WC_GRAPH_LEGEND, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_graph_legend_widgets, lengthof(_nested_graph_legend_widgets)
 
	_nested_graph_legend_widgets, lengthof(_nested_graph_legend_widgets)
 
);
 

	
 
static void ShowGraphLegend()
 
{
 
	AllocateWindowDescFront<GraphLegendWindow>(&_graph_legend_desc, 0);
 
}
 
@@ -526,13 +526,13 @@ static const NWidgetPart _nested_operati
 
};
 

	
 
static const WindowDesc _operating_profit_desc(
 
	WDP_AUTO, WDP_AUTO, 576, 174, 576, 174,
 
	WC_OPERATING_PROFIT, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_operating_profit_widgets, lengthof(_nested_operating_profit_widgets)
 
	_nested_operating_profit_widgets, lengthof(_nested_operating_profit_widgets)
 
);
 

	
 

	
 
void ShowOperatingProfitGraph()
 
{
 
	AllocateWindowDescFront<OperatingProfitGraphWindow>(&_operating_profit_desc, 0);
 
@@ -567,13 +567,13 @@ static const NWidgetPart _nested_income_
 

	
 

	
 
static const WindowDesc _income_graph_desc(
 
	WDP_AUTO, WDP_AUTO, 576, 142, 576, 142,
 
	WC_INCOME_GRAPH, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_income_graph_widgets, lengthof(_nested_income_graph_widgets)
 
	_nested_income_graph_widgets, lengthof(_nested_income_graph_widgets)
 
);
 

	
 
void ShowIncomeGraph()
 
{
 
	AllocateWindowDescFront<IncomeGraphWindow>(&_income_graph_desc, 0);
 
}
 
@@ -605,13 +605,13 @@ static const NWidgetPart _nested_deliver
 
};
 

	
 
static const WindowDesc _delivered_cargo_graph_desc(
 
	WDP_AUTO, WDP_AUTO, 576, 142, 576, 142,
 
	WC_DELIVERED_CARGO, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_delivered_cargo_graph_widgets, lengthof(_nested_delivered_cargo_graph_widgets)
 
	_nested_delivered_cargo_graph_widgets, lengthof(_nested_delivered_cargo_graph_widgets)
 
);
 

	
 
void ShowDeliveredCargoGraph()
 
{
 
	AllocateWindowDescFront<DeliveredCargoGraphWindow>(&_delivered_cargo_graph_desc, 0);
 
}
 
@@ -659,13 +659,13 @@ static const NWidgetPart _nested_perform
 
};
 

	
 
static const WindowDesc _performance_history_desc(
 
	WDP_AUTO, WDP_AUTO, 576, 238, 576, 238,
 
	WC_PERFORMANCE_HISTORY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_performance_history_widgets, lengthof(_nested_performance_history_widgets)
 
	_nested_performance_history_widgets, lengthof(_nested_performance_history_widgets)
 
);
 

	
 
void ShowPerformanceHistoryGraph()
 
{
 
	AllocateWindowDescFront<PerformanceHistoryGraphWindow>(&_performance_history_desc, 0);
 
}
 
@@ -697,13 +697,13 @@ static const NWidgetPart _nested_company
 
};
 

	
 
static const WindowDesc _company_value_graph_desc(
 
	WDP_AUTO, WDP_AUTO, 576, 238, 576, 238,
 
	WC_COMPANY_VALUE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_company_value_graph_widgets, lengthof(_nested_company_value_graph_widgets)
 
	_nested_company_value_graph_widgets, lengthof(_nested_company_value_graph_widgets)
 
);
 

	
 
void ShowCompanyValueGraph()
 
{
 
	AllocateWindowDescFront<CompanyValueGraphWindow>(&_company_value_graph_desc, 0);
 
}
 
@@ -859,13 +859,13 @@ static const NWidgetPart _nested_cargo_p
 
};
 

	
 
static const WindowDesc _cargo_payment_rates_desc(
 
	WDP_AUTO, WDP_AUTO, 568, 46, 568, 46,
 
	WC_PAYMENT_RATES, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_cargo_payment_rates_widgets, lengthof(_nested_cargo_payment_rates_widgets)
 
	_nested_cargo_payment_rates_widgets, lengthof(_nested_cargo_payment_rates_widgets)
 
);
 

	
 

	
 
void ShowCargoPaymentRates()
 
{
 
	AllocateWindowDescFront<PaymentRatesGraphWindow>(&_cargo_payment_rates_desc, 0);
 
@@ -989,13 +989,13 @@ static const NWidgetPart _nested_company
 
};
 

	
 
static const WindowDesc _company_league_desc(
 
	WDP_AUTO, WDP_AUTO, 400, 167, 400, 167,
 
	WC_COMPANY_LEAGUE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	NULL, _nested_company_league_widgets, lengthof(_nested_company_league_widgets)
 
	_nested_company_league_widgets, lengthof(_nested_company_league_widgets)
 
);
 

	
 
void ShowCompanyLeagueTable()
 
{
 
	AllocateWindowDescFront<CompanyLeagueWindow>(&_company_league_desc, 0);
 
}
 
@@ -1272,13 +1272,13 @@ static const NWidgetPart _nested_perform
 
};
 

	
 
static const WindowDesc _performance_rating_detail_desc(
 
	WDP_AUTO, WDP_AUTO, 299, 241, 299, 241,
 
	WC_PERFORMANCE_DETAIL, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_performance_rating_detail_widgets, lengthof(_nested_performance_rating_detail_widgets)
 
	_nested_performance_rating_detail_widgets, lengthof(_nested_performance_rating_detail_widgets)
 
);
 

	
 
void ShowPerformanceRatingDetail()
 
{
 
	AllocateWindowDescFront<PerformanceRatingDetailWindow>(&_performance_rating_detail_desc, 0);
 
}
src/group_gui.cpp
Show inline comments
 
@@ -683,20 +683,20 @@ public:
 

	
 

	
 
static WindowDesc _other_group_desc(
 
	WDP_AUTO, WDP_AUTO, 460, 194, 460, 246,
 
	WC_INVALID, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_group_widgets, lengthof(_nested_group_widgets)
 
	_nested_group_widgets, lengthof(_nested_group_widgets)
 
);
 

	
 
const static WindowDesc _train_group_desc(
 
	WDP_AUTO, WDP_AUTO, 525, 194, 525, 246,
 
	WC_TRAINS_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_group_widgets, lengthof(_nested_group_widgets)
 
	_nested_group_widgets, lengthof(_nested_group_widgets)
 
);
 

	
 
void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type)
 
{
 
	if (!Company::IsValidID(company)) return;
 

	
src/highscore_gui.cpp
Show inline comments
 
@@ -179,20 +179,20 @@ static const NWidgetPart _nested_highsco
 
};
 

	
 
static const WindowDesc _highscore_desc(
 
	0, 0, 641, 481, 641, 481,
 
	WC_HIGHSCORE, WC_NONE,
 
	0,
 
	NULL, _nested_highscore_widgets, lengthof(_nested_highscore_widgets)
 
	_nested_highscore_widgets, lengthof(_nested_highscore_widgets)
 
);
 

	
 
static const WindowDesc _endgame_desc(
 
	0, 0, 641, 481, 641, 481,
 
	WC_ENDSCREEN, WC_NONE,
 
	0,
 
	NULL, _nested_highscore_widgets, lengthof(_nested_highscore_widgets)
 
	_nested_highscore_widgets, lengthof(_nested_highscore_widgets)
 
);
 

	
 
/** Show the highscore table for a given difficulty. When called from
 
 * endgame ranking is set to the top5 element that was newly added
 
 * and is thus highlighted */
 
void ShowHighscoreTable(int difficulty, int8 ranking)
src/industry_gui.cpp
Show inline comments
 
@@ -125,13 +125,13 @@ static const NWidgetPart _nested_build_i
 

	
 
/** Window definition of the dynamic place industries gui */
 
static const WindowDesc _build_industry_desc(
 
	WDP_AUTO, WDP_AUTO, 170, 212, 170, 212,
 
	WC_BUILD_INDUSTRY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_build_industry_widgets, lengthof(_nested_build_industry_widgets)
 
	_nested_build_industry_widgets, lengthof(_nested_build_industry_widgets)
 
);
 

	
 
/** Build (fund or prospect) a new industry, */
 
class BuildIndustryWindow : public Window {
 
	int selected_index;                         ///< index of the element in the matrix
 
	IndustryType selected_type;                 ///< industry corresponding to the above index
 
@@ -820,13 +820,13 @@ static const NWidgetPart _nested_industr
 

	
 
/** Window definition of the view industy gui */
 
static const WindowDesc _industry_view_desc(
 
	WDP_AUTO, WDP_AUTO, 260, 120, 260, 120,
 
	WC_INDUSTRY_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_industry_view_widgets, lengthof(_nested_industry_view_widgets)
 
	_nested_industry_view_widgets, lengthof(_nested_industry_view_widgets)
 
);
 

	
 
void ShowIndustryViewWindow(int industry)
 
{
 
	AllocateWindowDescFront<IndustryViewWindow>(&_industry_view_desc, industry);
 
}
 
@@ -1197,13 +1197,13 @@ const StringID IndustryDirectoryWindow::
 

	
 
/** Window definition of the industy directory gui */
 
static const WindowDesc _industry_directory_desc(
 
	WDP_AUTO, WDP_AUTO, 428, 190, 428, 190,
 
	WC_INDUSTRY_DIRECTORY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets)
 
	_nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets)
 
);
 

	
 
void ShowIndustryDirectory()
 
{
 
	AllocateWindowDescFront<IndustryDirectoryWindow>(&_industry_directory_desc, 0);
 
}
src/intro_gui.cpp
Show inline comments
 
@@ -251,13 +251,12 @@ static const NWidgetPart _nested_select_
 
};
 

	
 
static const WindowDesc _select_game_desc(
 
	WDP_CENTER, WDP_CENTER, 336, 213, 336, 213,
 
	WC_SELECT_GAME, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL,
 
	_nested_select_game_widgets, lengthof(_nested_select_game_widgets)
 
);
 

	
 
void ShowSelectGameWindow()
 
{
 
	new SelectGameWindow(&_select_game_desc);
src/main_gui.cpp
Show inline comments
 
@@ -200,13 +200,13 @@ static const struct NWidgetPart _nested_
 
};
 

	
 
static const WindowDesc _main_window_desc(
 
	0, 0, 0, 0, 0, 0,
 
	WC_MAIN_WINDOW, WC_NONE,
 
	0,
 
	NULL, _nested_main_window_widgets, lengthof(_nested_main_window_widgets)
 
	_nested_main_window_widgets, lengthof(_nested_main_window_widgets)
 
);
 

	
 
struct MainWindow : Window
 
{
 
	MainWindow() : Window()
 
	{
src/misc_gui.cpp
Show inline comments
 
@@ -72,13 +72,13 @@ static const NWidgetPart _nested_land_in
 
};
 

	
 
static const WindowDesc _land_info_desc(
 
	WDP_AUTO, WDP_AUTO, 0, 0, 0, 0,
 
	WC_LAND_INFO, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_land_info_widgets, lengthof(_nested_land_info_widgets)
 
	_nested_land_info_widgets, lengthof(_nested_land_info_widgets)
 
);
 

	
 
class LandInfoWindow : public Window {
 
	enum {
 
		LAND_INFO_CENTERED_LINES   = 12,                       ///< Up to 12 centered lines
 
		LAND_INFO_MULTICENTER_LINE = LAND_INFO_CENTERED_LINES, ///< One multicenter line
 
@@ -346,13 +346,13 @@ static const NWidgetPart _nested_about_w
 
};
 

	
 
static const WindowDesc _about_desc(
 
	WDP_CENTER, WDP_CENTER, 0, 0, 0, 0,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_about_widgets, lengthof(_nested_about_widgets)
 
	_nested_about_widgets, lengthof(_nested_about_widgets)
 
);
 

	
 
static const char * const _credits[] = {
 
	"Original design by Chris Sawyer",
 
	"Original graphics by Simon Foster",
 
	"",
 
@@ -506,13 +506,13 @@ static const NWidgetPart _nested_errmsg_
 
};
 

	
 
static const WindowDesc _errmsg_desc(
 
	0, 0, 240, 46, 240, 46, // x/y position is not used.
 
	WC_ERRMSG, WC_NONE,
 
	WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_errmsg_widgets, lengthof(_nested_errmsg_widgets)
 
	_nested_errmsg_widgets, lengthof(_nested_errmsg_widgets)
 
);
 

	
 
static const NWidgetPart _nested_errmsg_face_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_RED, EMW_CLOSE),
 
		NWidget(WWT_CAPTION, COLOUR_RED, EMW_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL),
 
@@ -526,13 +526,13 @@ static const NWidgetPart _nested_errmsg_
 
};
 

	
 
static const WindowDesc _errmsg_face_desc(
 
	0, 0, 334, 137, 334, 137, // x/y position is not used.
 
	WC_ERRMSG, WC_NONE,
 
	WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_errmsg_face_widgets, lengthof(_nested_errmsg_face_widgets)
 
	_nested_errmsg_face_widgets, lengthof(_nested_errmsg_face_widgets)
 
);
 

	
 
/** Window class for displaying an error message window. */
 
struct ErrmsgWindow : public Window {
 
private:
 
	uint duration;                  ///< Length of display of the message. 0 means forever,
 
@@ -773,13 +773,13 @@ static const NWidgetPart _nested_tooltip
 
};
 

	
 
static const WindowDesc _tool_tips_desc(
 
	100, 100, 0, 0, 0, 0, // Coordinates and sizes are not used,
 
	WC_TOOLTIPS, WC_NONE,
 
	0,
 
	NULL, _nested_tooltips_widgets, lengthof(_nested_tooltips_widgets)
 
	_nested_tooltips_widgets, lengthof(_nested_tooltips_widgets)
 
);
 

	
 
/** Window for displaying a tooltip. */
 
struct TooltipsWindow : public Window
 
{
 
	StringID string_id;         ///< String to display as tooltip.
 
@@ -1456,13 +1456,13 @@ static const NWidgetPart _nested_query_s
 
};
 

	
 
static const WindowDesc _query_string_desc(
 
	190, 219, 260, 42, 260, 42,
 
	WC_QUERY_STRING, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	NULL, _nested_query_string_widgets, lengthof(_nested_query_string_widgets)
 
	_nested_query_string_widgets, lengthof(_nested_query_string_widgets)
 
);
 

	
 
/** Show a query popup window with a textbox in it.
 
 * @param str StringID for the text shown in the textbox
 
 * @param caption StringID of text shown in caption of querywindow
 
 * @param maxsize maximum size in bytes (including terminating '\0')
 
@@ -1611,13 +1611,13 @@ static const NWidgetPart _nested_query_w
 
};
 

	
 
static const WindowDesc _query_desc(
 
	WDP_CENTER, WDP_CENTER, 210, 82, 210, 82,
 
	WC_CONFIRM_POPUP_QUERY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_DEF_WIDGET | WDF_MODAL,
 
	NULL, _nested_query_widgets, lengthof(_nested_query_widgets)
 
	_nested_query_widgets, lengthof(_nested_query_widgets)
 
);
 

	
 
/** Show a modal confirmation window with standard 'yes' and 'no' buttons
 
 * The window is aligned to the centre of its parent.
 
 * @param caption string shown as window caption
 
 * @param message string that will be shown for the window
 
@@ -2059,20 +2059,20 @@ public:
 
};
 

	
 
static const WindowDesc _load_dialog_desc(
 
	WDP_CENTER, WDP_CENTER, 257, 154, 257, 294,
 
	WC_SAVELOAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets)
 
	_nested_load_dialog_widgets, lengthof(_nested_load_dialog_widgets)
 
);
 

	
 
static const WindowDesc _save_dialog_desc(
 
	WDP_CENTER, WDP_CENTER, 257, 180, 257, 320,
 
	WC_SAVELOAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets)
 
	_nested_save_dialog_widgets, lengthof(_nested_save_dialog_widgets)
 
);
 

	
 
/** These values are used to convert the file/operations mode into a corresponding file type.
 
 * So each entry, as expressed by the related comment, is based on the enum   */
 
static const FileType _file_modetotype[] = {
 
	FT_SAVEGAME,  ///< used for SLD_LOAD_GAME
src/music_gui.cpp
Show inline comments
 
@@ -410,13 +410,13 @@ static const NWidgetPart _nested_music_t
 
};
 

	
 
static const WindowDesc _music_track_selection_desc(
 
	104, 131, 432, 218, 432, 218,
 
	WC_MUSIC_TRACK_SELECTION, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_music_track_selection_widgets, lengthof(_nested_music_track_selection_widgets)
 
	_nested_music_track_selection_widgets, lengthof(_nested_music_track_selection_widgets)
 
);
 

	
 
static void ShowMusicTrackSelection()
 
{
 
	AllocateWindowDescFront<MusicTrackSelectionWindow>(&_music_track_selection_desc, 0);
 
}
 
@@ -672,13 +672,13 @@ static const NWidgetPart _nested_music_w
 
};
 

	
 
static const WindowDesc _music_window_desc(
 
	0, 22, 300, 66, 300, 66,
 
	WC_MUSIC_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_music_window_widgets, lengthof(_nested_music_window_widgets)
 
	_nested_music_window_widgets, lengthof(_nested_music_window_widgets)
 
);
 

	
 
void ShowMusicWindow()
 
{
 
	AllocateWindowDescFront<MusicWindow>(&_music_window_desc, 0);
 
}
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -543,13 +543,13 @@ static const NWidgetPart _nested_chat_wi
 
};
 

	
 
static const WindowDesc _chat_window_desc(
 
	WDP_CENTER, 0, 320, 14, 640, 14, // x, y, width, height
 
	WC_SEND_NETWORK_MSG, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET,
 
	NULL, _nested_chat_window_widgets, lengthof(_nested_chat_window_widgets)
 
	_nested_chat_window_widgets, lengthof(_nested_chat_window_widgets)
 
);
 

	
 
void ShowNetworkChatQueryWindow(DestType type, int dest)
 
{
 
	DeleteWindowByClass(WC_SEND_NETWORK_MSG);
 
	new NetworkChatWindow(&_chat_window_desc, type, dest);
src/network/network_content_gui.cpp
Show inline comments
 
@@ -47,13 +47,13 @@ static const NWidgetPart _nested_network
 

	
 
/** Window description for the download window */
 
static const WindowDesc _network_content_download_status_window_desc(
 
	WDP_CENTER, WDP_CENTER, 350, 85, 350, 85,
 
	WC_NETWORK_STATUS_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_MODAL,
 
	NULL, _nested_network_content_download_status_window_widgets, lengthof(_nested_network_content_download_status_window_widgets)
 
	_nested_network_content_download_status_window_widgets, lengthof(_nested_network_content_download_status_window_widgets)
 
);
 

	
 
/** Window for showing the download status of content */
 
struct NetworkContentDownloadStatusWindow : public Window, ContentCallback {
 
private:
 
	ClientNetworkContentSocketHandler *connection; ///< Our connection with the content server
 
@@ -871,13 +871,13 @@ static const NWidgetPart _nested_network
 

	
 
/** Window description of the content list */
 
static const WindowDesc _network_content_list_desc(
 
	WDP_CENTER, WDP_CENTER, 450, 278, 630, 460,
 
	WC_NETWORK_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_network_content_list_widgets, lengthof(_nested_network_content_list_widgets)
 
	_nested_network_content_list_widgets, lengthof(_nested_network_content_list_widgets)
 
);
 

	
 
/**
 
 * Show the content list window with a given set of content
 
 * @param cv the content to show, or NULL when it has to search for itself
 
 * @param type the type to (only) show
src/network/network_gui.cpp
Show inline comments
 
@@ -1011,13 +1011,13 @@ static const NWidgetPart _nested_network
 
};
 

	
 
static const WindowDesc _network_game_window_desc(
 
	WDP_CENTER, WDP_CENTER, 450, 264, 1000, 730,
 
	WC_NETWORK_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_network_game_widgets, lengthof(_nested_network_game_widgets)
 
	_nested_network_game_widgets, lengthof(_nested_network_game_widgets)
 
);
 

	
 
void ShowNetworkGameWindow()
 
{
 
	static bool first = true;
 
	DeleteWindowById(WC_NETWORK_WINDOW, 0);
 
@@ -1428,13 +1428,13 @@ static const NWidgetPart _nested_network
 
};
 

	
 
static const WindowDesc _network_start_server_window_desc(
 
	WDP_CENTER, WDP_CENTER, 420, 244, 420, 244,
 
	WC_NETWORK_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_network_start_server_window_widgets, lengthof(_nested_network_start_server_window_widgets)
 
	_nested_network_start_server_window_widgets, lengthof(_nested_network_start_server_window_widgets)
 
);
 

	
 
static void ShowNetworkStartServerWindow()
 
{
 
	DeleteWindowById(WC_NETWORK_WINDOW, 0);
 

	
 
@@ -1719,13 +1719,13 @@ static const NWidgetPart _nested_network
 
};
 

	
 
static const WindowDesc _network_lobby_window_desc(
 
	WDP_CENTER, WDP_CENTER, 0, 0, 0, 0,
 
	WC_NETWORK_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_network_lobby_window_widgets, lengthof(_nested_network_lobby_window_widgets)
 
	_nested_network_lobby_window_widgets, lengthof(_nested_network_lobby_window_widgets)
 
);
 

	
 
/* Show the networklobbywindow with the selected server
 
 * @param ngl Selected game pointer which is passed to the new window */
 
static void ShowNetworkLobbyWindow(NetworkGameList *ngl)
 
{
 
@@ -1762,13 +1762,13 @@ static const NWidgetPart _nested_client_
 
};
 

	
 
static const WindowDesc _client_list_popup_desc(
 
	WDP_AUTO, WDP_AUTO, 150, 1, 150, 1,
 
	WC_TOOLBAR_MENU, WC_CLIENT_LIST,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET,
 
	NULL, _nested_client_list_popup_widgets, lengthof(_nested_client_list_popup_widgets)
 
	_nested_client_list_popup_widgets, lengthof(_nested_client_list_popup_widgets)
 
);
 

	
 
/* Finds the Xth client-info that is active */
 
static NetworkClientInfo *NetworkFindClientInfo(byte client_no)
 
{
 
	NetworkClientInfo *ci;
 
@@ -1978,13 +1978,13 @@ static const NWidgetPart _nested_client_
 
};
 

	
 
static const WindowDesc _client_list_desc(
 
	WDP_AUTO, WDP_AUTO, 250, 16, 250, 16,
 
	WC_CLIENT_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_client_list_widgets, lengthof(_nested_client_list_widgets)
 
	_nested_client_list_widgets, lengthof(_nested_client_list_widgets)
 
);
 

	
 
/**
 
 * Main handle for clientlist
 
 */
 
struct NetworkClientListWindow : Window {
 
@@ -2217,13 +2217,13 @@ static const NWidgetPart _nested_network
 
};
 

	
 
static const WindowDesc _network_join_status_window_desc(
 
	WDP_CENTER, WDP_CENTER, 250, 85, 250, 85,
 
	WC_NETWORK_STATUS_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_MODAL,
 
	NULL, _nested_network_join_status_window_widgets, lengthof(_nested_network_join_status_window_widgets)
 
	_nested_network_join_status_window_widgets, lengthof(_nested_network_join_status_window_widgets)
 
);
 

	
 
void ShowJoinStatusWindow()
 
{
 
	DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 
	new NetworkJoinStatusWindow(&_network_join_status_window_desc);
 
@@ -2342,13 +2342,13 @@ static const NWidgetPart _nested_network
 
};
 

	
 
static const WindowDesc _network_company_password_window_desc(
 
	WDP_AUTO, WDP_AUTO, 300, 63, 300, 63,
 
	WC_COMPANY_PASSWORD_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	NULL, _nested_network_company_password_window_widgets, lengthof(_nested_network_company_password_window_widgets)
 
	_nested_network_company_password_window_widgets, lengthof(_nested_network_company_password_window_widgets)
 
);
 

	
 
void ShowNetworkCompanyPasswordWindow(Window *parent)
 
{
 
	DeleteWindowById(WC_COMPANY_PASSWORD_WINDOW, 0);
 

	
src/newgrf_gui.cpp
Show inline comments
 
@@ -488,13 +488,13 @@ static const NWidgetPart _nested_newgrf_
 

	
 
/* Window definition for the add a newgrf window */
 
static const WindowDesc _newgrf_add_dlg_desc(
 
	WDP_CENTER, WDP_CENTER, 0, 0, 306, 347,
 
	WC_SAVELOAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_newgrf_add_dlg_widgets, lengthof(_nested_newgrf_add_dlg_widgets)
 
	_nested_newgrf_add_dlg_widgets, lengthof(_nested_newgrf_add_dlg_widgets)
 
);
 

	
 
static GRFPresetList _grf_preset_list;
 

	
 
class DropDownListPresetItem : public DropDownListItem {
 
public:
 
@@ -1042,13 +1042,13 @@ static const NWidgetPart _nested_newgrf_
 

	
 
/* Window definition of the manage newgrfs window */
 
static const WindowDesc _newgrf_desc(
 
	WDP_CENTER, WDP_CENTER, 300, 263, 300, 263,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	NULL, _nested_newgrf_widgets, lengthof(_nested_newgrf_widgets)
 
	_nested_newgrf_widgets, lengthof(_nested_newgrf_widgets)
 
);
 

	
 
/** Callback function for the newgrf 'apply changes' confirmation window
 
 * @param w Window which is calling this callback
 
 * @param confirmed boolean value, true when yes was clicked, false otherwise
 
 */
src/news_gui.cpp
Show inline comments
 
@@ -106,13 +106,13 @@ static const NWidgetPart _nested_normal_
 
};
 

	
 
static WindowDesc _normal_news_desc(
 
	WDP_CENTER, 476, 430, 170, 430, 170,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	NULL, _nested_normal_news_widgets, lengthof(_nested_normal_news_widgets)
 
	_nested_normal_news_widgets, lengthof(_nested_normal_news_widgets)
 
);
 

	
 
/* New vehicles news items. */
 
static const NWidgetPart _nested_vehicle_news_widgets[] = {
 
	NWidget(WWT_PANEL, COLOUR_WHITE, NTW_PANEL),
 
		NWidget(NWID_HORIZONTAL), SetPadding(1, 1, 0, 1),
 
@@ -133,13 +133,13 @@ static const NWidgetPart _nested_vehicle
 
};
 

	
 
static WindowDesc _vehicle_news_desc(
 
	WDP_CENTER, 476, 430, 170, 430, 170,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	NULL, _nested_vehicle_news_widgets, lengthof(_nested_vehicle_news_widgets)
 
	_nested_vehicle_news_widgets, lengthof(_nested_vehicle_news_widgets)
 
);
 

	
 
/* Company news items. */
 
static const NWidgetPart _nested_company_news_widgets[] = {
 
	NWidget(WWT_PANEL, COLOUR_WHITE, NTW_PANEL),
 
		NWidget(NWID_HORIZONTAL), SetPadding(1, 1, 0, 1),
 
@@ -164,13 +164,13 @@ static const NWidgetPart _nested_company
 
};
 

	
 
static WindowDesc _company_news_desc(
 
	WDP_CENTER, 476, 430, 170, 430, 170,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	NULL, _nested_company_news_widgets, lengthof(_nested_company_news_widgets)
 
	_nested_company_news_widgets, lengthof(_nested_company_news_widgets)
 
);
 

	
 
/* Thin news items. */
 
static const NWidgetPart _nested_thin_news_widgets[] = {
 
	NWidget(WWT_PANEL, COLOUR_WHITE, NTW_PANEL),
 
		NWidget(NWID_HORIZONTAL), SetPadding(1, 1, 0, 1),
 
@@ -187,13 +187,13 @@ static const NWidgetPart _nested_thin_ne
 
};
 

	
 
static WindowDesc _thin_news_desc(
 
	WDP_CENTER, 476, 430, 130, 430, 130,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	NULL, _nested_thin_news_widgets, lengthof(_nested_thin_news_widgets)
 
	_nested_thin_news_widgets, lengthof(_nested_thin_news_widgets)
 
);
 

	
 
/* Small news items. */
 
static NWidgetPart _nested_small_news_widgets[] = {
 
	/* Caption + close box */
 
	NWidget(NWID_HORIZONTAL),
 
@@ -211,13 +211,13 @@ static NWidgetPart _nested_small_news_wi
 
};
 

	
 
static WindowDesc _small_news_desc(
 
	WDP_CENTER, 476, 280, 87, 280, 87,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	NULL, _nested_small_news_widgets, lengthof(_nested_small_news_widgets)
 
	_nested_small_news_widgets, lengthof(_nested_small_news_widgets)
 
);
 

	
 
/**
 
 * Data common to all news items of a given subtype (structure)
 
 */
 
struct NewsSubtypeData {
 
@@ -1020,13 +1020,13 @@ static const NWidgetPart _nested_message
 
};
 

	
 
static const WindowDesc _message_history_desc(
 
	240, 22, 400, 140, 400, 140,
 
	WC_MESSAGE_HISTORY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_message_history, lengthof(_nested_message_history)
 
	_nested_message_history, lengthof(_nested_message_history)
 
);
 

	
 
/** Display window with news messages history */
 
void ShowMessageHistory()
 
{
 
	DeleteWindowById(WC_MESSAGE_HISTORY, 0);
 
@@ -1308,13 +1308,13 @@ static const NWidgetPart _nested_message
 
};
 

	
 
static const WindowDesc _message_options_desc(
 
	270,  22,  0, 0, 0, 0,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_message_options_widgets, lengthof(_nested_message_options_widgets)
 
	_nested_message_options_widgets, lengthof(_nested_message_options_widgets)
 
);
 

	
 
void ShowMessageOptions()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	new MessageOptionsWindow(&_message_options_desc);
src/order_gui.cpp
Show inline comments
 
@@ -1342,13 +1342,13 @@ static const NWidgetPart _nested_orders_
 
};
 

	
 
static const WindowDesc _orders_train_desc(
 
	WDP_AUTO, WDP_AUTO, 384, 100, 384, 100,
 
	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_orders_train_widgets, lengthof(_nested_orders_train_widgets)
 
	_nested_orders_train_widgets, lengthof(_nested_orders_train_widgets)
 
);
 

	
 
/** Nested widget definition for "your" orders (non-train). */
 
static const NWidgetPart _nested_orders_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_GREY, ORDER_WIDGET_CLOSEBOX),
 
@@ -1406,13 +1406,13 @@ static const NWidgetPart _nested_orders_
 
};
 

	
 
static const WindowDesc _orders_desc(
 
	WDP_AUTO, WDP_AUTO, 384, 100, 384, 100,
 
	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_orders_widgets, lengthof(_nested_orders_widgets)
 
	_nested_orders_widgets, lengthof(_nested_orders_widgets)
 
);
 

	
 
/** Nested widget definition for competitor orders. */
 
static const NWidgetPart _nested_other_orders_widgets[] = {
 
	NWidget(NWID_VERTICAL),
 
		NWidget(NWID_HORIZONTAL),
 
@@ -1432,13 +1432,13 @@ static const NWidgetPart _nested_other_o
 
};
 

	
 
static const WindowDesc _other_orders_desc(
 
	WDP_AUTO, WDP_AUTO, 384, 86, 384, 86,
 
	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_other_orders_widgets, lengthof(_nested_other_orders_widgets)
 
	_nested_other_orders_widgets, lengthof(_nested_other_orders_widgets)
 
);
 

	
 
void ShowOrdersWindow(const Vehicle *v)
 
{
 
	DeleteWindowById(WC_VEHICLE_DETAILS, v->index, false);
 
	DeleteWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
src/osk_gui.cpp
Show inline comments
 
@@ -391,13 +391,13 @@ static const NWidgetPart _nested_osk_wid
 
};
 

	
 
static const WindowDesc _osk_desc(
 
	WDP_CENTER, WDP_CENTER, 256, 140, 256, 140,
 
	WC_OSK, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_osk_widgets, lengthof(_nested_osk_widgets)
 
	_nested_osk_widgets, lengthof(_nested_osk_widgets)
 
);
 

	
 
/**
 
 * Retrieve keyboard layout from language string or (if set) config file.
 
 * Also check for invalid characters.
 
 */
src/rail_gui.cpp
Show inline comments
 
@@ -859,13 +859,13 @@ static const NWidgetPart _nested_build_r
 
};
 

	
 
static const WindowDesc _build_rail_desc(
 
	WDP_ALIGN_TBR, 22, 350, 36, 350, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_build_rail_widgets, lengthof(_nested_build_rail_widgets)
 
	_nested_build_rail_widgets, lengthof(_nested_build_rail_widgets)
 
);
 

	
 

	
 
/**
 
 * Open the build rail toolbar window for a specific rail type.
 
 * The window may be opened in the 'normal' way by clicking at the rail icon in
 
@@ -1469,21 +1469,21 @@ static const NWidgetPart _nested_newstat
 

	
 
/** High level window description of the default station-build window */
 
static const WindowDesc _station_builder_desc(
 
	WDP_AUTO, WDP_AUTO, 148, 200, 148, 200,
 
	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_station_builder_widgets, lengthof(_nested_station_builder_widgets)
 
	_nested_station_builder_widgets, lengthof(_nested_station_builder_widgets)
 
);
 

	
 
/** High level window description of the newGRF station-build window */
 
static const WindowDesc _newstation_builder_desc(
 
	WDP_AUTO, WDP_AUTO, 148, 290, 148, 290,
 
	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_newstation_builder_widgets, lengthof(_nested_newstation_builder_widgets)
 
	_nested_newstation_builder_widgets, lengthof(_nested_newstation_builder_widgets)
 
);
 

	
 
/** Open station build window */
 
static void ShowStationBuilder(Window *parent)
 
{
 
	if (GetNumStationClasses() <= 2 && GetNumCustomStations(STAT_CLASS_DFLT) == 1) {
 
@@ -1684,13 +1684,13 @@ static const NWidgetPart _nested_signal_
 

	
 
/** Signal selection window description */
 
static const WindowDesc _signal_builder_desc(
 
	WDP_AUTO, WDP_AUTO, 154, 68, 154, 68,
 
	WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
 
	NULL, _nested_signal_builder_widgets, lengthof(_nested_signal_builder_widgets)
 
	_nested_signal_builder_widgets, lengthof(_nested_signal_builder_widgets)
 
);
 

	
 
/**
 
 * Open the signal selection window
 
 */
 
static void ShowSignalBuilder(Window *parent)
 
@@ -1777,13 +1777,13 @@ static const NWidgetPart _nested_build_d
 
};
 

	
 
static const WindowDesc _build_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 140, 122, 140, 122,
 
	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_depot_widgets, lengthof(_nested_build_depot_widgets)
 
	_nested_build_depot_widgets, lengthof(_nested_build_depot_widgets)
 
);
 

	
 
static void ShowBuildTrainDepotPicker(Window *parent)
 
{
 
	new BuildRailDepotWindow(&_build_depot_desc, parent);
 
}
 
@@ -1879,13 +1879,13 @@ static const NWidgetPart _nested_build_w
 
};
 

	
 
static const WindowDesc _build_waypoint_desc(
 
	WDP_AUTO, WDP_AUTO, 344, 92, 344, 92,
 
	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_waypoint_widgets, lengthof(_nested_build_waypoint_widgets)
 
	_nested_build_waypoint_widgets, lengthof(_nested_build_waypoint_widgets)
 
);
 

	
 
static void ShowBuildWaypointPicker(Window *parent)
 
{
 
	new BuildRailWaypointWindow(&_build_waypoint_desc, parent);
 
}
src/road_gui.cpp
Show inline comments
 
@@ -663,13 +663,13 @@ static const NWidgetPart _nested_build_r
 
};
 

	
 
static const WindowDesc _build_road_desc(
 
	WDP_ALIGN_TBR, 22, 263, 36, 263, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_build_road_widgets, lengthof(_nested_build_road_widgets)
 
	_nested_build_road_widgets, lengthof(_nested_build_road_widgets)
 
);
 

	
 
static const NWidgetPart _nested_build_tramway_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN, RTW_CLOSEBOX),
 
		NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
 
@@ -701,13 +701,13 @@ static const NWidgetPart _nested_build_t
 
};
 

	
 
static const WindowDesc _build_tramway_desc(
 
	WDP_ALIGN_TBR, 22, 241, 36, 241, 36,
 
	WC_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_build_tramway_widgets, lengthof(_nested_build_tramway_widgets)
 
	_nested_build_tramway_widgets, lengthof(_nested_build_tramway_widgets)
 
);
 

	
 
void ShowBuildRoadToolbar(RoadType roadtype)
 
{
 
	if (!Company::IsValidID(_local_company)) return;
 
	_cur_roadtype = roadtype;
 
@@ -743,13 +743,13 @@ static const NWidgetPart _nested_build_r
 
};
 

	
 
static const WindowDesc _build_road_scen_desc(
 
	WDP_AUTO, WDP_AUTO, 197, 36, 197, 36,
 
	WC_SCEN_BUILD_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_build_road_scen_widgets, lengthof(_nested_build_road_scen_widgets)
 
	_nested_build_road_scen_widgets, lengthof(_nested_build_road_scen_widgets)
 
);
 

	
 
void ShowBuildRoadScenToolbar()
 
{
 
	_cur_roadtype = ROADTYPE_ROAD;
 
	AllocateWindowDescFront<BuildRoadToolbarWindow>(&_build_road_scen_desc, 0);
 
@@ -843,13 +843,13 @@ static const NWidgetPart _nested_build_r
 
};
 

	
 
static const WindowDesc _build_road_depot_desc(
 
	WDP_AUTO, WDP_AUTO, 140, 122, 140, 122,
 
	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_road_depot_widgets, lengthof(_nested_build_road_depot_widgets)
 
	_nested_build_road_depot_widgets, lengthof(_nested_build_road_depot_widgets)
 
);
 

	
 
static void ShowRoadDepotPicker(Window *parent)
 
{
 
	new BuildRoadDepotWindow(&_build_road_depot_desc, parent);
 
}
 
@@ -1008,13 +1008,13 @@ static const NWidgetPart _nested_rv_stat
 
};
 

	
 
static const WindowDesc _rv_station_picker_desc(
 
	WDP_AUTO, WDP_AUTO, 207, 178, 207, 178,
 
	WC_BUS_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_rv_station_picker_widgets, lengthof(_nested_rv_station_picker_widgets)
 
	_nested_rv_station_picker_widgets, lengthof(_nested_rv_station_picker_widgets)
 
);
 

	
 
static void ShowRVStationPicker(Window *parent, RoadStopType rs)
 
{
 
	new BuildRoadStationWindow(&_rv_station_picker_desc, parent, rs);
 
}
src/settings_gui.cpp
Show inline comments
 
@@ -489,13 +489,13 @@ static const NWidgetPart _nested_game_op
 
};
 

	
 
static const WindowDesc _game_options_desc(
 
	WDP_CENTER, WDP_CENTER, 370, 249, 370, 249,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_game_options_widgets, lengthof(_nested_game_options_widgets)
 
	_nested_game_options_widgets, lengthof(_nested_game_options_widgets)
 
);
 

	
 

	
 
void ShowGameOptions()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
@@ -767,13 +767,13 @@ static const NWidgetPart _nested_game_di
 

	
 
/** Window definition for the game difficulty settings window */
 
static const WindowDesc _game_difficulty_desc(
 
	WDP_CENTER, WDP_CENTER, 370, 279, 370, 279,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_game_difficulty_widgets, lengthof(_nested_game_difficulty_widgets)
 
	_nested_game_difficulty_widgets, lengthof(_nested_game_difficulty_widgets)
 
);
 

	
 
void ShowGameDifficulty()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	new GameDifficultyWindow(&_game_difficulty_desc);
 
@@ -1653,13 +1653,13 @@ static const NWidgetPart _nested_setting
 
};
 

	
 
static const WindowDesc _settings_selection_desc(
 
	WDP_CENTER, WDP_CENTER, 412, 188, 450, 397,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE,
 
	NULL, _nested_settings_selection_widgets, lengthof(_nested_settings_selection_widgets)
 
	_nested_settings_selection_widgets, lengthof(_nested_settings_selection_widgets)
 
);
 

	
 
void ShowGameSettings()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	new GameSettingsWindow(&_settings_selection_desc);
 
@@ -1935,13 +1935,13 @@ static const NWidgetPart _nested_cust_cu
 
};
 

	
 
static const WindowDesc _cust_currency_desc(
 
	WDP_CENTER, WDP_CENTER, 230, 120, 230, 120,
 
	WC_CUSTOM_CURRENCY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_cust_currency_widgets, lengthof(_nested_cust_currency_widgets)
 
	_nested_cust_currency_widgets, lengthof(_nested_cust_currency_widgets)
 
);
 

	
 
static void ShowCustCurrency()
 
{
 
	DeleteWindowById(WC_CUSTOM_CURRENCY, 0);
 
	new CustomCurrencyWindow(&_cust_currency_desc);
src/signs_gui.cpp
Show inline comments
 
@@ -203,13 +203,13 @@ static const NWidgetPart _nested_sign_li
 
};
 

	
 
static const WindowDesc _sign_list_desc(
 
	WDP_AUTO, WDP_AUTO, 0, 0, 358, 138,
 
	WC_SIGN_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_sign_list_widgets, lengthof(_nested_sign_list_widgets)
 
	_nested_sign_list_widgets, lengthof(_nested_sign_list_widgets)
 
);
 

	
 

	
 
void ShowSignList()
 
{
 
	AllocateWindowDescFront<SignListWindow>(&_sign_list_desc, 0);
 
@@ -401,13 +401,13 @@ static const NWidgetPart _nested_query_s
 
};
 

	
 
static const WindowDesc _query_sign_edit_desc(
 
	190, 170, 260, 42, 260, 42,
 
	WC_QUERY_STRING, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_query_sign_edit_widgets, lengthof(_nested_query_sign_edit_widgets)
 
	_nested_query_sign_edit_widgets, lengthof(_nested_query_sign_edit_widgets)
 
);
 

	
 
void HandleClickOnSign(const Sign *si)
 
{
 
	if (_ctrl_pressed && si->owner == _local_company) {
 
		RenameSign(si->index, NULL);
src/smallmap_gui.cpp
Show inline comments
 
@@ -1148,13 +1148,13 @@ SmallMapWindow::SmallMapType SmallMapWin
 
bool SmallMapWindow::show_towns = true;
 

	
 
static const WindowDesc _smallmap_desc(
 
	WDP_AUTO, WDP_AUTO, 350, 214, 446, 314,
 
	WC_SMALLMAP, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_smallmap_widgets, lengthof(_nested_smallmap_widgets)
 
	_nested_smallmap_widgets, lengthof(_nested_smallmap_widgets)
 
);
 

	
 
void ShowSmallMap()
 
{
 
	AllocateWindowDescFront<SmallMapWindow>(&_smallmap_desc, 0);
 
}
src/station_gui.cpp
Show inline comments
 
@@ -661,13 +661,13 @@ static const NWidgetPart _nested_company
 
};
 

	
 
static const WindowDesc _company_stations_desc(
 
	WDP_AUTO, WDP_AUTO, 358, 162, 358, 162,
 
	WC_STATION_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_company_stations_widgets, lengthof(_nested_company_stations_widgets)
 
	_nested_company_stations_widgets, lengthof(_nested_company_stations_widgets)
 
);
 

	
 
/**
 
 * Opens window with list of company's stations
 
 *
 
 * @param company whose stations' list show
 
@@ -1110,13 +1110,13 @@ struct StationViewWindow : public Window
 

	
 

	
 
static const WindowDesc _station_view_desc(
 
	WDP_AUTO, WDP_AUTO, 249, 110, 249, 110,
 
	WC_STATION_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_station_view_widgets, lengthof(_nested_station_view_widgets)
 
	_nested_station_view_widgets, lengthof(_nested_station_view_widgets)
 
);
 

	
 
/**
 
 * Opens StationViewWindow for given station
 
 *
 
 * @param station station which window should be opened
 
@@ -1360,13 +1360,13 @@ struct SelectStationWindow : Window {
 
};
 

	
 
static const WindowDesc _select_station_desc(
 
	WDP_AUTO, WDP_AUTO, 200, 80, 200, 180,
 
	WC_SELECT_STATION, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_select_station_widgets, lengthof(_nested_select_station_widgets)
 
	_nested_select_station_widgets, lengthof(_nested_select_station_widgets)
 
);
 

	
 

	
 
/**
 
 * Check whether we need to show the station selection window.
 
 * @param cmd Command to build the station.
src/statusbar_gui.cpp
Show inline comments
 
@@ -214,13 +214,13 @@ static const NWidgetPart _nested_main_st
 
};
 

	
 
static const WindowDesc _main_status_desc(
 
	WDP_CENTER, 0, 320, 12, 640, 12,
 
	WC_STATUS_BAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_NO_FOCUS,
 
	NULL, _nested_main_status_widgets, lengthof(_nested_main_status_widgets)
 
	_nested_main_status_widgets, lengthof(_nested_main_status_widgets)
 
);
 

	
 
/**
 
 * Checks whether the news ticker is currently being used.
 
 */
 
bool IsNewsTickerShown()
src/subsidy_gui.cpp
Show inline comments
 
@@ -247,13 +247,13 @@ static const NWidgetPart _nested_subsidi
 
};
 

	
 
static const WindowDesc _subsidies_list_desc(
 
	WDP_AUTO, WDP_AUTO, 320, 127, 500, 127,
 
	WC_SUBSIDIES_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_subsidies_list_widgets, lengthof(_nested_subsidies_list_widgets)
 
	_nested_subsidies_list_widgets, lengthof(_nested_subsidies_list_widgets)
 
);
 

	
 

	
 
void ShowSubsidiesList()
 
{
 
	AllocateWindowDescFront<SubsidyListWindow>(&_subsidies_list_desc, 0);
src/terraform_gui.cpp
Show inline comments
 
@@ -341,13 +341,13 @@ static const NWidgetPart _nested_terrafo
 
};
 

	
 
static const WindowDesc _terraform_desc(
 
	WDP_ALIGN_TBR, 22 + 36, 158, 36, 158, 36,
 
	WC_SCEN_LAND_GEN, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_terraform_widgets, lengthof(_nested_terraform_widgets)
 
	_nested_terraform_widgets, lengthof(_nested_terraform_widgets)
 
);
 

	
 
Window *ShowTerraformToolbar(Window *link)
 
{
 
	if (!Company::IsValidID(_local_company)) return NULL;
 

	
 
@@ -774,13 +774,13 @@ struct ScenarioEditorLandscapeGeneration
 
};
 

	
 
static const WindowDesc _scen_edit_land_gen_desc(
 
	WDP_AUTO, WDP_AUTO, 163, 103, 163, 103,
 
	WC_SCEN_LAND_GEN, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_scen_edit_land_gen_widgets, lengthof(_nested_scen_edit_land_gen_widgets)
 
	_nested_scen_edit_land_gen_widgets, lengthof(_nested_scen_edit_land_gen_widgets)
 
);
 

	
 
Window *ShowEditorTerraformToolbar()
 
{
 
	return AllocateWindowDescFront<ScenarioEditorLandscapeGenerationWindow>(&_scen_edit_land_gen_desc, 0);
 
}
src/timetable_gui.cpp
Show inline comments
 
@@ -382,13 +382,13 @@ static const NWidgetPart _nested_timetab
 
};
 

	
 
static const WindowDesc _timetable_desc(
 
	WDP_AUTO, WDP_AUTO, 400, 130, 400, 130,
 
	WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_timetable_widgets, lengthof(_nested_timetable_widgets)
 
	_nested_timetable_widgets, lengthof(_nested_timetable_widgets)
 
);
 

	
 
void ShowTimetableWindow(const Vehicle *v)
 
{
 
	DeleteWindowById(WC_VEHICLE_DETAILS, v->index, false);
 
	DeleteWindowById(WC_VEHICLE_ORDERS, v->index, false);
src/toolbar_gui.cpp
Show inline comments
 
@@ -1363,13 +1363,13 @@ static const NWidgetPart _nested_toolbar
 
};
 

	
 
static const WindowDesc _toolb_normal_desc(
 
	0, 0, 0, 22, 640, 22,
 
	WC_MAIN_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_NO_FOCUS,
 
	NULL, _nested_toolbar_normal_widgets, lengthof(_nested_toolbar_normal_widgets)
 
	_nested_toolbar_normal_widgets, lengthof(_nested_toolbar_normal_widgets)
 
);
 

	
 

	
 
/* --- Toolbar handling for the scenario editor */
 

	
 
static ToolbarButtonProc * const _scen_toolbar_button_procs[] = {
 
@@ -1586,13 +1586,13 @@ static const NWidgetPart _nested_toolb_s
 
};
 

	
 
static const WindowDesc _toolb_scen_desc(
 
	0, 0, 0, 22, 640, 22,
 
	WC_MAIN_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_NO_FOCUS,
 
	NULL, _nested_toolb_scen_widgets, lengthof(_nested_toolb_scen_widgets)
 
	_nested_toolb_scen_widgets, lengthof(_nested_toolb_scen_widgets)
 
);
 

	
 
/* --- Allocating the toolbar --- */
 

	
 
void AllocateToolbar()
 
{
src/town_gui.cpp
Show inline comments
 
@@ -267,13 +267,13 @@ public:
 
};
 

	
 
static const WindowDesc _town_authority_desc(
 
	WDP_AUTO, WDP_AUTO, 317, 222, 317, 222,
 
	WC_TOWN_AUTHORITY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	NULL, _nested_town_authority_widgets, lengthof(_nested_town_authority_widgets)
 
	_nested_town_authority_widgets, lengthof(_nested_town_authority_widgets)
 
);
 

	
 
static void ShowTownAuthorityWindow(uint town)
 
{
 
	AllocateWindowDescFront<TownAuthorityWindow>(&_town_authority_desc, town);
 
}
 
@@ -509,13 +509,13 @@ static const NWidgetPart _nested_town_ga
 
};
 

	
 
static const WindowDesc _town_game_view_desc(
 
	WDP_AUTO, WDP_AUTO, 260, TownViewWindow::TVW_HEIGHT_NORMAL, 260, TownViewWindow::TVW_HEIGHT_NORMAL,
 
	WC_TOWN_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	NULL, _nested_town_game_view_widgets, lengthof(_nested_town_game_view_widgets)
 
	_nested_town_game_view_widgets, lengthof(_nested_town_game_view_widgets)
 
);
 

	
 
static const NWidgetPart _nested_town_editor_view_widgets[] = {
 
	NWidget(NWID_HORIZONTAL),
 
		NWidget(WWT_CLOSEBOX, COLOUR_BROWN, TVW_CLOSEBOX),
 
		NWidget(WWT_CAPTION, COLOUR_BROWN, TVW_CAPTION), SetDataTip(STR_TOWN_VIEW_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
 
@@ -536,13 +536,13 @@ static const NWidgetPart _nested_town_ed
 
};
 

	
 
static const WindowDesc _town_editor_view_desc(
 
	WDP_AUTO, WDP_AUTO, 260, TownViewWindow::TVW_HEIGHT_NORMAL, 260, TownViewWindow::TVW_HEIGHT_NORMAL,
 
	WC_TOWN_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	NULL, _nested_town_editor_view_widgets, lengthof(_nested_town_editor_view_widgets)
 
	_nested_town_editor_view_widgets, lengthof(_nested_town_editor_view_widgets)
 
);
 

	
 
void ShowTownViewWindow(TownID town)
 
{
 
	if (_game_mode == GM_EDITOR) {
 
		AllocateWindowDescFront<TownViewWindow>(&_town_editor_view_desc, town);
 
@@ -827,13 +827,13 @@ GUITownList::SortFunction * const TownDi
 
};
 

	
 
static const WindowDesc _town_directory_desc(
 
	WDP_AUTO, WDP_AUTO, 208, 202, 208, 202,
 
	WC_TOWN_DIRECTORY, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_town_directory_widgets, lengthof(_nested_town_directory_widgets)
 
	_nested_town_directory_widgets, lengthof(_nested_town_directory_widgets)
 
);
 

	
 
void ShowTownDirectory()
 
{
 
	if (BringWindowToFrontById(WC_TOWN_DIRECTORY, 0)) return;
 
	new TownDirectoryWindow(&_town_directory_desc);
 
@@ -1103,13 +1103,13 @@ public:
 
};
 

	
 
static const WindowDesc _found_town_desc(
 
	WDP_AUTO, WDP_AUTO, 160, 162, 160, 162,
 
	WC_FOUND_TOWN, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_CONSTRUCTION,
 
	NULL, _nested_found_town_widgets, lengthof(_nested_found_town_widgets)
 
	_nested_found_town_widgets, lengthof(_nested_found_town_widgets)
 
);
 

	
 
void ShowFoundTownWindow()
 
{
 
	if (_game_mode != GM_EDITOR && !Company::IsValidID(_local_company)) return;
 
	AllocateWindowDescFront<FoundTownWindow>(&_found_town_desc, 0);
src/transparency_gui.cpp
Show inline comments
 
@@ -152,13 +152,13 @@ static const NWidgetPart _nested_transpa
 
};
 

	
 
static const WindowDesc _transparency_desc(
 
	WDP_ALIGN_TBR, 94, 219, 49, 219, 49,
 
	WC_TRANSPARENCY_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	NULL, _nested_transparency_widgets, lengthof(_nested_transparency_widgets)
 
	_nested_transparency_widgets, lengthof(_nested_transparency_widgets)
 
);
 

	
 
void ShowTransparencyToolbar()
 
{
 
	AllocateWindowDescFront<TransparenciesWindow>(&_transparency_desc, 0);
 
}
src/tree_gui.cpp
Show inline comments
 
@@ -228,13 +228,13 @@ static const NWidgetPart _nested_build_t
 
};
 

	
 
static const WindowDesc _build_trees_desc(
 
	WDP_AUTO, WDP_AUTO, 143, 184, 143, 184,
 
	WC_BUILD_TREES, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	NULL, _nested_build_trees_widgets, lengthof(_nested_build_trees_widgets)
 
	_nested_build_trees_widgets, lengthof(_nested_build_trees_widgets)
 
);
 

	
 
void ShowBuildTreesToolbar()
 
{
 
	if (_game_mode != GM_EDITOR && !Company::IsValidID(_local_company)) return;
 
	AllocateWindowDescFront<BuildTreesWindow>(&_build_trees_desc, 0);
src/vehicle_gui.cpp
Show inline comments
 
@@ -430,13 +430,13 @@ static const NWidgetPart _nested_vehicle
 
};
 

	
 
static const WindowDesc _vehicle_refit_desc(
 
	WDP_AUTO, WDP_AUTO, 240, 174, 240, 174,
 
	WC_VEHICLE_REFIT, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	NULL, _nested_vehicle_refit_widgets, lengthof(_nested_vehicle_refit_widgets)
 
	_nested_vehicle_refit_widgets, lengthof(_nested_vehicle_refit_widgets)
 
);
 

	
 
/** Show the refit window for a vehicle
 
 * @param *v The vehicle to show the refit window for
 
 * @param order of the vehicle ( ? )
 
 * @param parent the parent window of the refit window
 
@@ -1141,13 +1141,13 @@ public:
 
};
 

	
 
static WindowDesc _vehicle_list_desc(
 
	WDP_AUTO, WDP_AUTO, 260, 194, 260, 246,
 
	WC_INVALID, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_vehicle_list, lengthof(_nested_vehicle_list)
 
	_nested_vehicle_list, lengthof(_nested_vehicle_list)
 
);
 

	
 
static void ShowVehicleListWindowLocal(CompanyID company, uint16 VLW_flag, VehicleType vehicle_type, uint16 unique_number)
 
{
 
	if (!Company::IsValidID(company)) return;
 

	
 
@@ -1552,21 +1552,21 @@ struct VehicleDetailsWindow : Window {
 

	
 
/** Vehicle details window descriptor. */
 
static const WindowDesc _train_vehicle_details_desc(
 
	WDP_AUTO, WDP_AUTO, 405, 113, 405, 178,
 
	WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_train_vehicle_details_widgets, lengthof(_nested_train_vehicle_details_widgets)
 
	_nested_train_vehicle_details_widgets, lengthof(_nested_train_vehicle_details_widgets)
 
);
 

	
 
/** Vehicle details window descriptor for other vehicles than a train. */
 
static const WindowDesc _nontrain_vehicle_details_desc(
 
	WDP_AUTO, WDP_AUTO, 405, 113, 405, 113,
 
	WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_nontrain_vehicle_details_widgets, lengthof(_nested_nontrain_vehicle_details_widgets)
 
	_nested_nontrain_vehicle_details_widgets, lengthof(_nested_nontrain_vehicle_details_widgets)
 
);
 

	
 
/** Shows the vehicle details window of the given vehicle. */
 
static void ShowVehicleDetailsWindow(const Vehicle *v)
 
{
 
	DeleteWindowById(WC_VEHICLE_ORDERS, v->index, false);
 
@@ -1617,23 +1617,23 @@ static const NWidgetPart _nested_vehicle
 

	
 
/** Vehicle view window descriptor for all vehicles but trains. */
 
static const WindowDesc _vehicle_view_desc(
 
	WDP_AUTO, WDP_AUTO, 250, 116, 250, 116,
 
	WC_VEHICLE_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
 
	_nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
 
);
 

	
 
/** Vehicle view window descriptor for trains. Only minimum_height and
 
 *  default_height are different for train view.
 
 */
 
static const WindowDesc _train_view_desc(
 
	WDP_AUTO, WDP_AUTO, 250, 134, 250, 134,
 
	WC_VEHICLE_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
 
	_nested_vehicle_view_widgets, lengthof(_nested_vehicle_view_widgets)
 
);
 

	
 

	
 
/* Just to make sure, nobody has changed the vehicle type constants, as we are
 
	 using them for array indexing in a number of places here. */
 
assert_compile(VEH_TRAIN == 0);
src/viewport_gui.cpp
Show inline comments
 
@@ -165,13 +165,13 @@ public:
 
};
 

	
 
static const WindowDesc _extra_view_port_desc(
 
	WDP_AUTO, WDP_AUTO, 300, 68, 300, 268,
 
	WC_EXTRA_VIEW_PORT, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	NULL, _nested_extra_view_port_widgets, lengthof(_nested_extra_view_port_widgets)
 
	_nested_extra_view_port_widgets, lengthof(_nested_extra_view_port_widgets)
 
);
 

	
 
void ShowExtraViewPortWindow(TileIndex tile)
 
{
 
	int i = 0;
 

	
src/waypoint_gui.cpp
Show inline comments
 
@@ -142,13 +142,13 @@ static const NWidgetPart _nested_waypoin
 
};
 

	
 
static const WindowDesc _waypoint_view_desc(
 
	WDP_AUTO, WDP_AUTO, 260, 118, 260, 118,
 
	WC_WAYPOINT_VIEW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	NULL, _nested_waypoint_view_widgets, lengthof(_nested_waypoint_view_widgets)
 
	_nested_waypoint_view_widgets, lengthof(_nested_waypoint_view_widgets)
 
);
 

	
 
void ShowWaypointWindow(const Waypoint *wp)
 
{
 
	AllocateWindowDescFront<WaypointWindow>(&_waypoint_view_desc, wp->index);
 
}
src/widgets/dropdown.cpp
Show inline comments
 
@@ -83,13 +83,13 @@ static const NWidgetPart _nested_dropdow
 
};
 

	
 
const WindowDesc _dropdown_desc(
 
	0, 0, 0, 0, 0, 0, // x/y position not used.
 
	WC_DROPDOWN_MENU, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	NULL, _nested_dropdown_menu_widgets, lengthof(_nested_dropdown_menu_widgets)
 
	_nested_dropdown_menu_widgets, lengthof(_nested_dropdown_menu_widgets)
 
);
 

	
 
/** Drop-down menu window */
 
struct DropdownWindow : Window {
 
	WindowClass parent_wnd_class; ///< Parent window class.
 
	WindowNumber parent_wnd_num;  ///< Parent window number.
src/window.cpp
Show inline comments
 
@@ -57,37 +57,36 @@ bool _scrolling_scrollbar;
 
bool _scrolling_viewport;
 

	
 
byte _special_mouse_mode;
 

	
 
/** Window description constructor. */
 
WindowDesc::WindowDesc(int16 left, int16 top, int16 min_width, int16 min_height, int16 def_width, int16 def_height,
 
			WindowClass window_class, WindowClass parent_class, uint32 flags, const Widget *widgets,
 
			WindowClass window_class, WindowClass parent_class, uint32 flags,
 
			const NWidgetPart *nwid_parts, int16 nwid_length)
 
{
 
	this->left = left;
 
	this->top = top;
 
	this->minimum_width = min_width;
 
	this->minimum_height = min_height;
 
	this->default_width = def_width;
 
	this->default_height = def_height;
 
	this->cls = window_class;
 
	this->parent_cls = parent_class;
 
	this->flags = flags;
 
	this->widgets = widgets;
 
	this->nwid_parts = nwid_parts;
 
	this->nwid_length = nwid_length;
 
	this->new_widgets = NULL;
 
}
 

	
 
/** Get widget array of the window description. */
 
const Widget *WindowDesc::GetWidgets() const
 
{
 
	if (this->nwid_parts != NULL) {
 
		InitializeWidgetArrayFromNestedWidgets(this->nwid_parts, this->nwid_length, this->widgets, &this->new_widgets);
 
		InitializeWidgetArrayFromNestedWidgets(this->nwid_parts, this->nwid_length, NULL, &this->new_widgets);
 
	}
 
	const Widget *wids = (this->new_widgets != NULL) ? this->new_widgets : this->widgets;
 
	const Widget *wids = this->new_widgets;
 
	assert(wids != NULL);
 
	return wids;
 
}
 

	
 
WindowDesc::~WindowDesc()
 
{
src/window_gui.h
Show inline comments
 
@@ -124,13 +124,13 @@ extern Window *_focused_window;
 
/**
 
 * High level window description
 
 */
 
struct WindowDesc : ZeroedMemoryAllocator {
 

	
 
	WindowDesc(int16 left, int16 top, int16 min_width, int16 min_height, int16 def_width, int16 def_height,
 
			WindowClass window_class, WindowClass parent_class, uint32 flags, const Widget *widgets,
 
			WindowClass window_class, WindowClass parent_class, uint32 flags,
 
			const NWidgetPart *nwid_parts = NULL, int16 nwid_length = 0);
 

	
 
	~WindowDesc();
 

	
 
	int16 left;                    ///< Prefered x position of left edge of the window. @see WindowDefaultPosition()
 
	int16 top;                     ///< Prefered y position of the top of the window. @see WindowDefaultPosition()
 
@@ -138,13 +138,12 @@ struct WindowDesc : ZeroedMemoryAllocato
 
	int16 minimum_height;          ///< Minimal height of the window.
 
	int16 default_width;           ///< Prefered initial width of the window.
 
	int16 default_height;          ///< Prefered initial height of the window.
 
	WindowClass cls;               ///< Class of the window, @see WindowClass.
 
	WindowClass parent_cls;        ///< Class of the parent window. @see WindowClass
 
	uint32 flags;                  ///< Flags. @see WindowDefaultFlags
 
	const Widget *widgets;         ///< List of widgets with their position and size for the window.
 
	const NWidgetPart *nwid_parts; ///< Nested widget parts describing the window.
 
	int16 nwid_length;             ///< Length of the #nwid_parts array.
 
	mutable Widget *new_widgets;   ///< Widgets generated from #nwid_parts.
 

	
 
	const Widget *GetWidgets() const;
 
};
0 comments (0 inline, 0 general)