Changeset - r11368:058349c3a02c
src/ai/ai_gui.cpp
Show inline comments
 
@@ -192,18 +192,18 @@ static const Widget _ai_list_widgets[] =
 
{ WWT_PUSHTXTBTN,    RESIZE_RTB,  COLOUR_MAUVE,    0,  187,  222,  233,  STR_CONTENT_INTRO_BUTTON, STR_CONTENT_INTRO_BUTTON_TIP},      // AIL_WIDGET_DOWNLOAD_CONTENT
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_MAUVE,  188,  199,  222,  233,  STR_NULL,                 STR_RESIZE_BUTTON},                 // AIL_WIDGET_RESIZE
 
{   WIDGETS_END},
 
};
 

	
 
/* Window definition for the ai list window. */
 
static const WindowDesc _ai_list_desc = {
 
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,
 
	_ai_list_widgets
 
};
 
);
 

	
 
void ShowAIListWindow(CompanyID slot)
 
{
 
	DeleteWindowByClass(WC_AI_LIST);
 
	new AIListWindow(&_ai_list_desc, slot);
 
}
 
@@ -374,18 +374,18 @@ static const Widget _ai_settings_widgets
 
{ WWT_PUSHTXTBTN,    RESIZE_RTB,  COLOUR_MAUVE,   94,  187,  196,  207,  STR_AI_RESET,             STR_NULL},                          // AIS_WIDGET_RESET
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_MAUVE,  188,  199,  196,  207,  STR_NULL,                 STR_RESIZE_BUTTON},                 // AIS_WIDGET_RESIZE
 
{   WIDGETS_END},
 
};
 

	
 
/* Window definition for the AI settings window. */
 
static const WindowDesc _ai_settings_desc = {
 
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,
 
	_ai_settings_widgets
 
};
 
);
 

	
 
void ShowAISettingsWindow(CompanyID slot)
 
{
 
	DeleteWindowByClass(WC_AI_LIST);
 
	DeleteWindowByClass(WC_AI_SETTINGS);
 
	new AISettingsWindow(&_ai_settings_desc, slot);
 
@@ -402,18 +402,18 @@ static const Widget _ai_config_widgets[]
 
{ WWT_PUSHTXTBTN,     RESIZE_TB,  COLOUR_YELLOW, 103,  195,  151,  162,  STR_AI_CONFIGURE,       STR_AI_CONFIGURE_TIP},             // AIC_WIDGET_CONFIGURE
 
{ WWT_PUSHTXTBTN,     RESIZE_TB,  COLOUR_YELLOW, 196,  289,  151,  162,  STR_AI_CLOSE,           STR_NULL},                         // AIC_WIDGET_CLOSE
 
{   WIDGETS_END},
 
};
 

	
 
/* Window definition for the configure AI window. */
 
static const WindowDesc _ai_config_desc = {
 
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,
 
	_ai_config_widgets
 
};
 
);
 

	
 
/**
 
 * Window to configure which AIs will start.
 
 */
 
struct AIConfigWindow : public Window {
 
	/** Enum referring to the widgets of the AI config window */
 
@@ -765,18 +765,18 @@ static const Widget _ai_debug_widgets[] 
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,   187,   223,    27,    39, 0x0,                        STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,   224,   260,    27,    39, 0x0,                        STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY}, // AID_WIDGET_COMPANY_BUTTON_END
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_GREY,   287,   298,   229,   240, STR_NULL,                   STR_RESIZE_BUTTON},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _ai_debug_desc = {
 
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_RESIZABLE,
 
	_ai_debug_widgets
 
};
 
);
 

	
 
void ShowAIDebugWindow(CompanyID show_company)
 
{
 
	if (!_networking || _network_server) {
 
		AIDebugWindow *w = (AIDebugWindow *)BringWindowToFrontById(WC_AI_DEBUG, 0);
 
		if (w == NULL) w = new AIDebugWindow(&_ai_debug_desc, 0);
src/airport_gui.cpp
Show inline comments
 
@@ -135,18 +135,18 @@ static const Widget _air_toolbar_widgets
 
{     WWT_IMGBTN,   RESIZE_NONE,   COLOUR_DARK_GREEN,     0,    41,    14,    35, SPR_IMG_AIRPORT,     STR_A01E_BUILD_AIRPORT },
 
{     WWT_IMGBTN,   RESIZE_NONE,   COLOUR_DARK_GREEN,    42,    63,    14,    35, SPR_IMG_DYNAMITE,    STR_018D_DEMOLISH_BUILDINGS_ETC },
 
{   WIDGETS_END},
 
};
 

	
 

	
 
static const WindowDesc _air_toolbar_desc = {
 
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,
 
	_air_toolbar_widgets,
 
};
 
	_air_toolbar_widgets
 
);
 

	
 
void ShowBuildAirToolbar()
 
{
 
	if (!IsValidCompanyID(_local_company)) return;
 

	
 
	DeleteWindowByClass(WC_BUILD_TOOLBAR);
 
@@ -296,18 +296,18 @@ static const Widget _build_airport_picke
 
{    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,        14,    73,   191,   202, STR_02DB_OFF,                     STR_3065_DON_T_HIGHLIGHT_COVERAGE},
 
{    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,        74,   133,   191,   202, STR_02DA_ON,                      STR_3064_HIGHLIGHT_COVERAGE_AREA},
 
{      WWT_LABEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,   178,   191, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_airport_desc = {
 
static const WindowDesc _build_airport_desc(
 
	WDP_AUTO, WDP_AUTO, 148, 240, 148, 240,
 
	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	_build_airport_picker_widgets,
 
};
 
	_build_airport_picker_widgets
 
);
 

	
 
static void ShowBuildAirportPicker(Window *parent)
 
{
 
	new AirportPickerWindow(&_build_airport_desc, parent);
 
}
 

	
src/autoreplace_gui.cpp
Show inline comments
 
@@ -467,25 +467,25 @@ static const Widget _replace_vehicle_wid
 
{   WWT_DROPDOWN,    RESIZE_RTB,  COLOUR_GREY,   154,   289,   128,   139, 0x0,                             STR_REPLACE_HELP_RAILTYPE},
 
{      WWT_PANEL,   RESIZE_LRTB,  COLOUR_GREY,   290,   305,   128,   139, 0x0,                             STR_NULL},
 
{ WWT_PUSHTXTBTN,   RESIZE_LRTB,  COLOUR_GREY,   306,   443,   128,   139, STR_REPLACE_REMOVE_WAGON,        STR_REPLACE_REMOVE_WAGON_HELP},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _replace_rail_vehicle_desc = {
 
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,
 
	_replace_vehicle_widgets,
 
};
 
	_replace_vehicle_widgets
 
);
 

	
 
static const WindowDesc _replace_vehicle_desc = {
 
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,
 
	_replace_vehicle_widgets,
 
};
 
	_replace_vehicle_widgets
 
);
 

	
 
RailType ReplaceVehicleWindow::sel_railtype = RAILTYPE_RAIL;
 

	
 
void ShowReplaceGroupVehicleWindow(GroupID id_g, VehicleType vehicletype)
 
{
 
	DeleteWindowById(WC_REPLACE_VEHICLE, vehicletype);
src/bridge_gui.cpp
Show inline comments
 
@@ -265,18 +265,18 @@ static const Widget _build_bridge_widget
 
{  WWT_SCROLLBAR, RESIZE_BOTTOM,  COLOUR_DARK_GREEN, 188, 199,  26, 101, 0x0,                         STR_0190_SCROLL_BAR_SCROLLS_LIST}, // BBSW_SCROLLBAR
 
{  WWT_RESIZEBOX,     RESIZE_TB,  COLOUR_DARK_GREEN, 188, 199, 102, 113, 0x0,                         STR_RESIZE_BUTTON},                // BBSW_RESIZEBOX
 
{   WIDGETS_END},
 
};
 

	
 
/* Window definition for the rail bridge selection window */
 
static const WindowDesc _build_bridge_desc = {
 
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,
 
	_build_bridge_widgets,
 
};
 
	_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
 
@@ -1084,18 +1084,18 @@ struct BuildVehicleWindow : Window {
 

	
 
		this->vscroll.cap += delta.y / (int)GetVehicleListHeight(this->vehicle_type);
 
		this->widget[BUILD_VEHICLE_WIDGET_LIST].data = (this->vscroll.cap << 8) + 1;
 
	}
 
};
 

	
 
static const WindowDesc _build_vehicle_desc = {
 
static const WindowDesc _build_vehicle_desc(
 
	WDP_AUTO, WDP_AUTO, 240, 174, 240, 256,
 
	WC_BUILD_VEHICLE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	_build_vehicle_widgets,
 
};
 
	_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.
 
	 *  As it always is a low value, it won't collide with any real tile
src/cheat_gui.cpp
Show inline comments
 
@@ -232,18 +232,18 @@ struct CheatWindow : Window {
 
	{
 
		this->clicked = 0;
 
		this->SetDirty();
 
	}
 
};
 

	
 
static const WindowDesc _cheats_desc = {
 
static const WindowDesc _cheats_desc(
 
	240, 22, 400, 170, 400, 170,
 
	WC_CHEATS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	_cheat_widgets,
 
};
 
	_cheat_widgets
 
);
 

	
 

	
 
void ShowCheatWindow()
 
{
 
	DeleteWindowById(WC_CHEATS, 0);
 
	new CheatWindow(&_cheats_desc);
src/company_gui.cpp
Show inline comments
 
@@ -307,25 +307,25 @@ struct CompanyFinancesWindow : Window {
 
				DoCommandP(0, 0, _ctrl_pressed, CMD_DECREASE_LOAN | CMD_MSG(STR_702F_CAN_T_REPAY_LOAN));
 
				break;
 
		}
 
	}
 
};
 

	
 
static const WindowDesc _company_finances_desc = {
 
static const WindowDesc _company_finances_desc(
 
	WDP_AUTO, WDP_AUTO, 407, 60 + 10, 407, 60 + 10,
 
	WC_FINANCES, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	_company_finances_widgets,
 
};
 
	_company_finances_widgets
 
);
 

	
 
static const WindowDesc _company_finances_small_desc = {
 
static const WindowDesc _company_finances_small_desc(
 
	WDP_AUTO, WDP_AUTO, 280, 60, 280, 60,
 
	WC_FINANCES, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON,
 
	_company_finances_small_widgets,
 
};
 
	_company_finances_small_widgets
 
);
 

	
 
/**
 
 * Open the small/large finance window of the company
 
 *
 
 * @param company        the company who's finances are requested to be seen
 
 * @param show_small     show large or small version opf the window
 
@@ -623,18 +623,18 @@ static const Widget _select_company_live
 
{ WWT_DROPDOWN, RESIZE_NONE,  COLOUR_GREY, 150, 274,  36,  47, STR_02BD,                   STR_LIVERY_PRIMARY_TIP },
 
{ WWT_DROPDOWN, RESIZE_NONE,  COLOUR_GREY, 275, 399,  36,  47, STR_02E1,                   STR_LIVERY_SECONDARY_TIP },
 
{   WWT_MATRIX, RESIZE_NONE,  COLOUR_GREY,   0, 399,  48,  48 + 1 * 14, (1 << 8) | 1,      STR_LIVERY_PANEL_TIP },
 
{ WIDGETS_END },
 
};
 

	
 
static const WindowDesc _select_company_livery_desc = {
 
static const WindowDesc _select_company_livery_desc(
 
	WDP_AUTO, WDP_AUTO, 400, 49 + 1 * 14, 400, 49 + 1 * 14,
 
	WC_COMPANY_COLOUR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	_select_company_livery_widgets,
 
};
 
	_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
 
 * @param x     x-position to draw the face
 
@@ -1090,26 +1090,26 @@ public:
 
			ShowErrorMessage(INVALID_STRING_ID, STR_FACE_FACECODE_ERR, 0, 0);
 
		}
 
	}
 
};
 

	
 
/** normal/simple company manager face selection window description */
 
static const WindowDesc _select_company_manager_face_desc = {
 
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,
 
	_select_company_manager_face_widgets,
 
};
 
	_select_company_manager_face_widgets
 
);
 

	
 
/** advanced company manager face selection window description */
 
static const WindowDesc _select_company_manager_face_adv_desc = {
 
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,
 
	_select_company_manager_face_adv_widgets,
 
};
 
	_select_company_manager_face_adv_widgets
 
);
 

	
 
/**
 
 * Open the simple/advanced company manager face selection window
 
 *
 
 * @param parent the parent company window
 
 * @param adv    simple or advanced face selection window
 
@@ -1453,18 +1453,18 @@ struct CompanyWindow : Window
 
				break;
 
#endif /* ENABLE_NETWORK */
 
		}
 
	}
 
};
 

	
 
static const WindowDesc _company_desc = {
 
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,
 
};
 
	_company_widgets
 
);
 

	
 
void ShowCompany(CompanyID company)
 
{
 
	if (!IsValidCompanyID(company)) return;
 

	
 
	AllocateWindowDescFront<CompanyWindow>(&_company_desc, company);
 
@@ -1512,18 +1512,18 @@ static const Widget _buy_company_widgets
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,     0,   333,    14,   136, 0x0,                   STR_NULL},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,   148,   207,   117,   128, STR_00C9_NO,           STR_NULL},
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,   218,   277,   117,   128, STR_00C8_YES,          STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _buy_company_desc = {
 
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,
 
	_buy_company_widgets,
 
};
 
	_buy_company_widgets
 
);
 

	
 

	
 
void ShowBuyCompanyDialog(CompanyID company)
 
{
 
	AllocateWindowDescFront<BuyCompanyWindow>(&_buy_company_desc, company);
 
}
src/console_gui.cpp
Show inline comments
 
@@ -314,18 +314,18 @@ struct IConsoleWindow : Window
 
int IConsoleWindow::scroll = 0;
 

	
 
static const Widget _iconsole_window_widgets[] = {
 
	{WIDGETS_END}
 
};
 

	
 
static const WindowDesc _iconsole_window_desc = {
 
static const WindowDesc _iconsole_window_desc(
 
	0, 0, 2, 2, 2, 2,
 
	WC_CONSOLE, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	_iconsole_window_widgets,
 
};
 
	_iconsole_window_widgets
 
);
 

	
 
void IConsoleGUIInit()
 
{
 
	_iconsole_historypos = ICON_HISTORY_SIZE - 1;
 
	_iconsole_mode = ICONSOLE_CLOSED;
 

	
src/depot_gui.cpp
Show inline comments
 
@@ -94,39 +94,39 @@ static const Widget _depot_widgets[] = {
 
	{ WWT_PUSHIMGBTN,   RESIZE_LRTB,  COLOUR_GREY,    12,    23,    15,    26, SPR_FLAG_VEH_RUNNING,STR_NULL},                         // DEPOT_WIDGET_START_ALL
 
	{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_GREY,    24,    35,    15,    26, 0x0,                 STR_RESIZE_BUTTON},                // DEPOT_WIDGET_RESIZE
 
	{   WIDGETS_END},
 
};
 

	
 

	
 
static const WindowDesc _train_depot_desc = {
 
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,
 
	_depot_widgets,
 
};
 
	_depot_widgets
 
);
 

	
 
static const WindowDesc _road_depot_desc = {
 
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,
 
	_depot_widgets,
 
};
 
	_depot_widgets
 
);
 

	
 
static const WindowDesc _ship_depot_desc = {
 
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,
 
	_depot_widgets,
 
};
 
	_depot_widgets
 
);
 

	
 
static const WindowDesc _aircraft_depot_desc = {
 
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,
 
	_depot_widgets,
 
};
 
	_depot_widgets
 
);
 

	
 
extern int WagonLengthToPixels(int len);
 
extern void DepotSortList(VehicleList *list);
 

	
 
/**
 
 * This is the Callback method after the cloning attempt of a vehicle
src/dock_gui.cpp
Show inline comments
 
@@ -271,18 +271,18 @@ static const Widget _build_docks_toolb_w
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   115,   136,    14,    35, SPR_IMG_BOUY,                    STR_9834_POSITION_BUOY_WHICH_CAN},       // DTW_BUOY
 
{     WWT_EMPTY,    RESIZE_NONE,  COLOUR_DARK_GREEN,     0,     0,     0,     0, 0x0,                             STR_NULL},                               // DTW_RIVER
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   137,   159,    14,    35, SPR_IMG_AQUEDUCT,                STR_BUILD_AQUEDUCT},                     // DTW_BUILD_AQUEDUCT
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_docks_toolbar_desc = {
 
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,
 
	_build_docks_toolb_widgets,
 
};
 
	_build_docks_toolb_widgets
 
);
 

	
 
void ShowBuildDocksToolbar()
 
{
 
	if (!IsValidCompanyID(_local_company)) return;
 

	
 
	DeleteWindowByClass(WC_BUILD_TOOLBAR);
 
@@ -306,18 +306,18 @@ static const Widget _build_docks_scen_to
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,    71,    92,    14,    35, SPR_IMG_BUILD_RIVER,                STR_CREATE_RIVER},                // DTW_RIVER
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,    93,   114,    14,    35, SPR_IMG_AQUEDUCT,                   STR_BUILD_AQUEDUCT},              // DTW_BUILD_AQUEDUCT
 
{   WIDGETS_END},
 
};
 

	
 
/* Window definition for the build docks in scenario editor window */
 
static const WindowDesc _build_docks_scen_toolbar_desc = {
 
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,
 
	_build_docks_scen_toolb_widgets,
 
};
 
	_build_docks_scen_toolb_widgets
 
);
 

	
 
void ShowBuildDocksScenToolbar()
 
{
 
	AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
 
}
 

	
 
@@ -392,18 +392,18 @@ static const Widget _build_dock_station_
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,          14,    73,    30,    40, STR_02DB_OFF,                     STR_3065_DON_T_HIGHLIGHT_COVERAGE}, // BDSW_LT_OFF
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,          74,   133,    30,    40, STR_02DA_ON,                      STR_3064_HIGHLIGHT_COVERAGE_AREA},  // BDSW_LT_ON
 
{      WWT_LABEL,   RESIZE_NONE,  COLOUR_DARK_GREEN,     0,   147,    17,    30, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL},                          // BDSW_INFO
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_dock_station_desc = {
 
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,
 
	_build_dock_station_widgets,
 
};
 
	_build_dock_station_widgets
 
);
 

	
 
static void ShowBuildDockStationPicker(Window *parent)
 
{
 
	new BuildDocksStationWindow(&_build_dock_station_desc, parent);
 
}
 

	
 
@@ -466,18 +466,18 @@ static const Widget _build_docks_depot_w
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_DARK_GREEN,     0,   203,    14,    85, 0x0,                             STR_NULL},                               // BDDW_BACKGROUND
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,           3,   100,    17,    82, 0x0,                             STR_3803_SELECT_SHIP_DEPOT_ORIENTATION}, // BDDW_X
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,         103,   200,    17,    82, 0x0,                             STR_3803_SELECT_SHIP_DEPOT_ORIENTATION}, // BDDW_Y
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_docks_depot_desc = {
 
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,
 
	_build_docks_depot_widgets,
 
};
 
	_build_docks_depot_widgets
 
);
 

	
 

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

	
 
static const WindowDesc _engine_preview_desc = {
 
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,
 
	_engine_preview_widgets,
 
};
 
	_engine_preview_widgets
 
);
 

	
 

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

	
 
			this->SetDirty();
 
		}
 
	}
 
};
 

	
 
static const WindowDesc _generate_landscape_desc = {
 
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,
 
	_generate_landscape_widgets,
 
};
 
	_generate_landscape_widgets
 
);
 

	
 
static const WindowDesc _heightmap_load_desc = {
 
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,
 
	_heightmap_load_widgets,
 
};
 
	_heightmap_load_widgets
 
);
 

	
 
static void _ShowGenerateLandscape(glwp_modes mode)
 
{
 
	uint x = 0;
 
	uint y = 0;
 

	
 
@@ -882,18 +882,18 @@ static const Widget _create_scenario_wid
 
{     WWT_IMGBTN, RESIZE_NONE, COLOUR_ORANGE, 282, 293, 131, 142, SPR_ARROW_DOWN,          STR_FLAT_WORLD_HEIGHT_DOWN},             // CSCEN_FLAT_LAND_HEIGHT_DOWN
 
{    WWT_TEXTBTN, RESIZE_NONE, COLOUR_ORANGE, 294, 314, 131, 142, STR_NUM_3,               STR_NULL},                               // CSCEN_FLAT_LAND_HEIGHT_TEXT
 
{     WWT_IMGBTN, RESIZE_NONE, COLOUR_ORANGE, 315, 326, 131, 142, SPR_ARROW_UP,            STR_FLAT_WORLD_HEIGHT_UP},               // CSCEN_FLAT_LAND_HEIGHT_UP
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _create_scenario_desc = {
 
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,
 
	_create_scenario_widgets,
 
};
 
	_create_scenario_widgets
 
);
 

	
 
void ShowCreateScenario()
 
{
 
	DeleteWindowByClass(WC_GENERATE_LANDSCAPE);
 
	new CreateScenarioWindow(&_create_scenario_desc, GLWP_SCENARIO);
 
}
 
@@ -903,18 +903,18 @@ static const Widget _generate_progress_w
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    0,   180,     0,    13, STR_GENERATION_WORLD,   STR_018C_WINDOW_TITLE_DRAG_THIS}, // GPWW_CAPTION
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,    0,   180,    14,    96, 0x0,                    STR_NULL},                        // GPWW_BACKGROUND
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_WHITE,  20,   161,    74,    85, STR_GENERATION_ABORT,   STR_NULL},                        // GPWW_ABORT
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _generate_progress_desc = {
 
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,
 
	_generate_progress_widgets,
 
};
 
	_generate_progress_widgets
 
);
 

	
 
struct tp_info {
 
	uint percent;
 
	StringID cls;
 
	uint current;
 
	uint total;
src/graph_gui.cpp
Show inline comments
 
@@ -95,18 +95,18 @@ static const Widget _graph_legend_widget
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     2,   247,   160,   171, 0x0,                            STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     2,   247,   172,   183, 0x0,                            STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     2,   247,   184,   195, 0x0,                            STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _graph_legend_desc = {
 
static const WindowDesc _graph_legend_desc(
 
	WDP_AUTO, WDP_AUTO, 250, 198, 250, 198,
 
	WC_GRAPH_LEGEND, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	_graph_legend_widgets,
 
};
 
	_graph_legend_widgets
 
);
 

	
 
static void ShowGraphLegend()
 
{
 
	AllocateWindowDescFront<GraphLegendWindow>(&_graph_legend_desc, 0);
 
}
 

	
 
@@ -436,18 +436,18 @@ static const Widget _operating_profit_wi
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   525,     0,    13, STR_7025_OPERATING_PROFIT_GRAPH, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   526,   575,     0,    13, STR_704C_KEY,                    STR_704D_SHOW_KEY_TO_GRAPHS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   575,    14,   173, 0x0,                             STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _operating_profit_desc = {
 
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,
 
	_operating_profit_widgets,
 
};
 
	_operating_profit_widgets
 
);
 

	
 

	
 
void ShowOperatingProfitGraph()
 
{
 
	AllocateWindowDescFront<OperatingProfitGraphWindow>(&_operating_profit_desc, 0);
 
}
 
@@ -475,18 +475,18 @@ static const Widget _income_graph_widget
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   525,     0,    13, STR_7022_INCOME_GRAPH, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   526,   575,     0,    13, STR_704C_KEY,          STR_704D_SHOW_KEY_TO_GRAPHS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   575,    14,   141, 0x0,                   STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _income_graph_desc = {
 
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,
 
	_income_graph_widgets,
 
};
 
	_income_graph_widgets
 
);
 

	
 
void ShowIncomeGraph()
 
{
 
	AllocateWindowDescFront<IncomeGraphWindow>(&_income_graph_desc, 0);
 
}
 

	
 
@@ -512,18 +512,18 @@ static const Widget _delivered_cargo_gra
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   525,     0,    13, STR_7050_UNITS_OF_CARGO_DELIVERED, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   526,   575,     0,    13, STR_704C_KEY,                      STR_704D_SHOW_KEY_TO_GRAPHS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   575,    14,   141, 0x0,                               STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _delivered_cargo_graph_desc = {
 
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,
 
	_delivered_cargo_graph_widgets,
 
};
 
	_delivered_cargo_graph_widgets
 
);
 

	
 
void ShowDeliveredCargoGraph()
 
{
 
	AllocateWindowDescFront<DeliveredCargoGraphWindow>(&_delivered_cargo_graph_desc, 0);
 
}
 

	
 
@@ -556,18 +556,18 @@ static const Widget _performance_history
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   526,   575,     0,    13, STR_704C_KEY,                         STR_704D_SHOW_KEY_TO_GRAPHS},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   476,   525,     0,    13, STR_PERFORMANCE_DETAIL_KEY,           STR_704D_SHOW_KEY_TO_GRAPHS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   575,    14,   237, 0x0,                                  STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _performance_history_desc = {
 
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,
 
	_performance_history_widgets,
 
};
 
	_performance_history_widgets
 
);
 

	
 
void ShowPerformanceHistoryGraph()
 
{
 
	AllocateWindowDescFront<PerformanceHistoryGraphWindow>(&_performance_history_desc, 0);
 
}
 

	
 
@@ -593,18 +593,18 @@ static const Widget _company_value_graph
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   525,     0,    13, STR_7052_COMPANY_VALUES, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   526,   575,     0,    13, STR_704C_KEY,            STR_704D_SHOW_KEY_TO_GRAPHS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   575,    14,   237, 0x0,                     STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _company_value_graph_desc = {
 
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,
 
	_company_value_graph_widgets,
 
};
 
	_company_value_graph_widgets
 
);
 

	
 
void ShowCompanyValueGraph()
 
{
 
	AllocateWindowDescFront<CompanyValueGraphWindow>(&_company_value_graph_desc, 0);
 
}
 

	
 
@@ -717,18 +717,18 @@ static const Widget _cargo_payment_rates
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_GREY,     0,    10,     0,    13, STR_00C5,                     STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   567,     0,    13, STR_7061_CARGO_PAYMENT_RATES, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{      WWT_PANEL, RESIZE_BOTTOM,  COLOUR_GREY,     0,   567,    14,    45, 0x0,                          STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _cargo_payment_rates_desc = {
 
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,
 
	_cargo_payment_rates_widgets,
 
};
 
	_cargo_payment_rates_widgets
 
);
 

	
 

	
 
void ShowCargoPaymentRates()
 
{
 
	AllocateWindowDescFront<PaymentRatesGraphWindow>(&_cargo_payment_rates_desc, 0);
 
}
 
@@ -840,18 +840,18 @@ static const Widget _company_league_widg
 
{    WWT_CAPTION, RESIZE_NONE,  COLOUR_GREY,  11, 387,  0,  13, STR_7053_COMPANY_LEAGUE_TABLE, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{  WWT_STICKYBOX, RESIZE_NONE,  COLOUR_GREY, 388, 399,  0,  13, STR_NULL,                      STR_STICKY_BUTTON},
 
{      WWT_PANEL, RESIZE_NONE,  COLOUR_GREY,   0, 399, 14, 166, 0x0,                           STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _company_league_desc = {
 
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,
 
	_company_league_widgets,
 
};
 
	_company_league_widgets
 
);
 

	
 
void ShowCompanyLeagueTable()
 
{
 
	AllocateWindowDescFront<CompanyLeagueWindow>(&_company_league_desc, 0);
 
}
 

	
 
@@ -1085,17 +1085,17 @@ static const Widget _performance_rating_
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,   150,   186,    27,    39, 0x0,                    STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,   187,   223,    27,    39, 0x0,                    STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,   224,   260,    27,    39, 0x0,                    STR_704F_CLICK_HERE_TO_TOGGLE_COMPANY},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _performance_rating_detail_desc = {
 
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,
 
	_performance_rating_detail_widgets,
 
};
 
	_performance_rating_detail_widgets
 
);
 

	
 
void ShowPerformanceRatingDetail()
 
{
 
	AllocateWindowDescFront<PerformanceRatingDetailWindow>(&_performance_rating_detail_desc, 0);
 
}
src/group_gui.cpp
Show inline comments
 
@@ -697,18 +697,18 @@ public:
 
	{
 
		if (this->vehicle_sel == vehicle) ResetObjectToPlace();
 
	}
 
};
 

	
 

	
 
static WindowDesc _group_desc = {
 
static WindowDesc _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,
 
	_group_widgets,
 
};
 
	_group_widgets
 
);
 

	
 
void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type)
 
{
 
	if (!IsValidCompanyID(company)) return;
 

	
 
	_group_desc.cls = GetWindowClassForVehicleType(vehicle_type);
src/highscore_gui.cpp
Show inline comments
 
@@ -163,25 +163,25 @@ struct HighScoreWindow : EndGameHighScor
 

	
 
static const Widget _highscore_widgets[] = {
 
{      WWT_PANEL, RESIZE_NONE,  COLOUR_END, 0, 640, 0, 480, 0x0, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _highscore_desc = {
 
static const WindowDesc _highscore_desc(
 
	0, 0, 641, 481, 641, 481,
 
	WC_HIGHSCORE, WC_NONE,
 
	0,
 
	_highscore_widgets,
 
};
 
	_highscore_widgets
 
);
 

	
 
static const WindowDesc _endgame_desc = {
 
static const WindowDesc _endgame_desc(
 
	0, 0, 641, 481, 641, 481,
 
	WC_ENDSCREEN, WC_NONE,
 
	0,
 
	_highscore_widgets,
 
};
 
	_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
 
@@ -82,18 +82,18 @@ static const Widget _build_industry_widg
 
{    WWT_TEXTBTN,     RESIZE_RTB,  COLOUR_DARK_GREEN,     0,   157,   200,   211, STR_FUND_NEW_INDUSTRY,          STR_NULL},                         // DPIW_FUND_WIDGET
 
{  WWT_RESIZEBOX,    RESIZE_LRTB,  COLOUR_DARK_GREEN,   158,   169,   200,   211, 0x0,                            STR_RESIZE_BUTTON},                // DPIW_RESIZE_WIDGET
 
{   WIDGETS_END},
 
};
 

	
 
/** Window definition of the dynamic place industries gui */
 
static const WindowDesc _build_industry_desc = {
 
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,
 
	_build_industry_widgets,
 
};
 
	_build_industry_widgets
 
);
 

	
 
class BuildIndustryWindow : public Window {
 
	int selected_index;                         ///< index of the element in the matrix
 
	IndustryType selected_type;                 ///< industry corresponding to the above index
 
	uint16 callback_timer;                      ///< timer counter for callback eventual verification
 
	bool timer_enabled;                         ///< timer can be used
 
@@ -670,18 +670,18 @@ static const Widget _industry_view_widge
 
{      WWT_PANEL,    RESIZE_RTB,  COLOUR_CREAM,   130,   247,   108,   119, 0x0,               STR_NULL},                         // IVW_SPACER
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_CREAM,   248,   259,   108,   119, 0x0,               STR_RESIZE_BUTTON},                // IVW_RESIZE
 
{   WIDGETS_END},
 
};
 

	
 
/** Window definition of the view industy gui */
 
static const WindowDesc _industry_view_desc = {
 
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,
 
	_industry_view_widgets,
 
};
 
	_industry_view_widgets
 
);
 

	
 
void ShowIndustryViewWindow(int industry)
 
{
 
	AllocateWindowDescFront<IndustryViewWindow>(&_industry_view_desc, industry);
 
}
 

	
 
@@ -982,17 +982,17 @@ const StringID IndustryDirectoryWindow::
 
	STR_SORT_BY_TRANSPORTED,
 
	INVALID_STRING_ID
 
};
 

	
 

	
 
/** Window definition of the industy directory gui */
 
static const WindowDesc _industry_directory_desc = {
 
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,
 
	_industry_directory_widgets,
 
};
 
	_industry_directory_widgets
 
);
 

	
 
void ShowIndustryDirectory()
 
{
 
	AllocateWindowDescFront<IndustryDirectoryWindow>(&_industry_directory_desc, 0);
 
}
src/intro_gui.cpp
Show inline comments
 
@@ -148,18 +148,18 @@ public:
 
			case SGI_AI_SETTINGS:     ShowAIConfigWindow(); break;
 
			case SGI_EXIT:            HandleExitGameRequest(); break;
 
		}
 
	}
 
};
 

	
 
static const WindowDesc _select_game_desc = {
 
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,
 
	_select_game_widgets,
 
};
 
	_select_game_widgets
 
);
 

	
 
void ShowSelectGameWindow()
 
{
 
	new SelectGameWindow(&_select_game_desc);
 
}
 

	
src/misc_gui.cpp
Show inline comments
 
@@ -48,18 +48,18 @@ static const Widget _land_info_widgets[]
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_GREY,     0,    10,     0,    13, STR_00C5,                       STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   299,     0,    13, STR_01A3_LAND_AREA_INFORMATION, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{      WWT_PANEL, RESIZE_BOTTOM,  COLOUR_GREY,     0,   299,    14,    99, 0x0,                            STR_NULL},
 
{    WIDGETS_END},
 
};
 

	
 
static const WindowDesc _land_info_desc = {
 
static const WindowDesc _land_info_desc(
 
	WDP_AUTO, WDP_AUTO, 300, 100, 300, 100,
 
	WC_LAND_INFO, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	_land_info_widgets,
 
};
 
	_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
 
		LAND_INFO_LINE_END,
 
@@ -280,18 +280,18 @@ static const Widget _about_widgets[] = {
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   419,     0,    13, STR_015B_OPENTTD, STR_NULL},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   419,    14,   271, 0x0,              STR_NULL},
 
{      WWT_FRAME,   RESIZE_NONE,  COLOUR_GREY,     5,   414,    40,   245, STR_NULL,         STR_NULL},
 
{    WIDGETS_END},
 
};
 

	
 
static const WindowDesc _about_desc = {
 
static const WindowDesc _about_desc(
 
	WDP_CENTER, WDP_CENTER, 420, 272, 420, 272,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
 
	_about_widgets,
 
};
 
	_about_widgets
 
);
 

	
 
struct AboutWindow : public Window {
 
	int scroll_height;
 
	uint16 counter;
 

	
 
	AboutWindow() : Window(&_about_desc)
 
@@ -1175,18 +1175,18 @@ static const Widget _query_string_widget
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,     0,    86,    30,    41, STR_DEFAULT,     STR_NULL}, // QUERY_STR_WIDGET_DEFAULT
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,    87,   172,    30,    41, STR_012E_CANCEL, STR_NULL}, // QUERY_STR_WIDGET_CANCEL
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,   173,   259,    30,    41, STR_012F_OK,     STR_NULL}, // QUERY_STR_WIDGET_OK
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _query_string_desc = {
 
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,
 
	_query_string_widgets,
 
};
 
	_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')
 
 * @param maxwidth maximum width in pixels allowed
 
@@ -1315,18 +1315,18 @@ static const Widget _query_widgets[] = {
 
{     WWT_PANEL, RESIZE_NONE,  COLOUR_RED,      0, 209,  14,  81, 0x0, /*OVERRIDE*/STR_NULL},
 
{WWT_PUSHTXTBTN, RESIZE_NONE,  COLOUR_YELLOW,  20,  90,  62,  73, STR_00C9_NO,     STR_NULL},
 
{WWT_PUSHTXTBTN, RESIZE_NONE,  COLOUR_YELLOW, 120, 190,  62,  73, STR_00C8_YES,    STR_NULL},
 
{   WIDGETS_END },
 
};
 

	
 
static const WindowDesc _query_desc = {
 
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,
 
	_query_widgets,
 
};
 
	_query_widgets
 
);
 

	
 
/** Show a modal confirmation window with standard 'yes' and 'no' buttons
 
 * The window is aligned to the centre of its parent.
 
 * NOTE: You cannot use BindCString as parameter for this window!
 
 * @param caption string shown as window caption
 
 * @param message string that will be shown for the window
 
@@ -1730,25 +1730,25 @@ public:
 
	virtual void OnInvalidateData(int data)
 
	{
 
		BuildFileList();
 
	}
 
};
 

	
 
static const WindowDesc _load_dialog_desc = {
 
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,
 
	_load_dialog_widgets,
 
};
 
	_load_dialog_widgets
 
);
 

	
 
static const WindowDesc _save_dialog_desc = {
 
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,
 
	_save_dialog_widgets,
 
};
 
	_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
 
	FT_SCENARIO,  ///< used for SLD_LOAD_SCENARIO
src/music_gui.cpp
Show inline comments
 
@@ -342,18 +342,18 @@ static const Widget _music_track_selecti
 
#if 0
 
{    WWT_PUSHBTN,   RESIZE_NONE,  COLOUR_GREY,   186,   245,   124,   131, 0x0,                              STR_01F9_SAVE_MUSIC_SETTINGS},           // MTSW_SAVE
 
#endif
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _music_track_selection_desc = {
 
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,
 
	_music_track_selection_widgets,
 
};
 
	_music_track_selection_widgets
 
);
 

	
 
static void ShowMusicTrackSelection()
 
{
 
	AllocateWindowDescFront<MusicTrackSelectionWindow>(&_music_track_selection_desc, 0);
 
}
 

	
 
@@ -543,17 +543,17 @@ static const Widget _music_window_widget
 
{    WWT_PUSHBTN,   RESIZE_NONE,  COLOUR_GREY,   150,   199,    58,    65, 0x0,                   STR_0330_SELECT_EZY_STREET_STYLE},         // MW_EZY
 
{    WWT_PUSHBTN,   RESIZE_NONE,  COLOUR_GREY,   200,   249,    58,    65, 0x0,                   STR_01F6_SELECT_CUSTOM_1_USER_DEFINED},    // MW_CUSTOM1
 
{    WWT_PUSHBTN,   RESIZE_NONE,  COLOUR_GREY,   250,   299,    58,    65, 0x0,                   STR_01F7_SELECT_CUSTOM_2_USER_DEFINED},    // MW_CUSTOM2
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _music_window_desc = {
 
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,
 
	_music_window_widgets,
 
};
 
	_music_window_widgets
 
);
 

	
 
void ShowMusicWindow()
 
{
 
	AllocateWindowDescFront<MusicWindow>(&_music_window_desc, 0);
 
}
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -498,18 +498,18 @@ static const Widget _chat_window_widgets
 
{      WWT_PANEL, RESIZE_RIGHT,  COLOUR_GREY,  11, 319,  0, 13, 0x0,                       STR_NULL}, // background
 
{    WWT_EDITBOX, RESIZE_RIGHT,  COLOUR_GREY,  75, 257,  1, 12, STR_NETWORK_CHAT_OSKTITLE, STR_NULL}, // text box
 
{ WWT_PUSHTXTBTN, RESIZE_LR,     COLOUR_GREY, 258, 319,  1, 12, STR_NETWORK_SEND,          STR_NULL}, // send button
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _chat_window_desc = {
 
static const WindowDesc _chat_window_desc(
 
	WDP_CENTER, -26, 320, 14, 640, 14, // x, y, width, height
 
	WC_SEND_NETWORK_MSG, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET,
 
	_chat_window_widgets,
 
};
 
	_chat_window_widgets
 
);
 

	
 
void ShowNetworkChatQueryWindow(DestType type, int dest)
 
{
 
	DeleteWindowById(WC_SEND_NETWORK_MSG, 0);
 
	new NetworkChatWindow (&_chat_window_desc, type, dest);
 
}
src/network/network_content_gui.cpp
Show inline comments
 
@@ -25,18 +25,18 @@ static const Widget _network_content_dow
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,      0,   349,    14,    84, 0x0,                        STR_NULL},                        // NCDSWW_BACKGROUND
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_WHITE,   125,   225,    69,    80, STR_012E_CANCEL,            STR_NULL},                        // NCDSWW_CANCELOK
 
{   WIDGETS_END},
 
};
 

	
 
/** Window description for the download window */
 
static const WindowDesc _network_content_download_status_window_desc = {
 
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,
 
	_network_content_download_status_window_widget,
 
};
 
	_network_content_download_status_window_widget
 
);
 

	
 
/** Window for showing the download status of content */
 
struct NetworkContentDownloadStatusWindow : public Window, ContentCallback {
 
	/** Widgets used by this window */
 
	enum Widgets {
 
		NCDSWW_CAPTION,    ///< Caption of the window
 
@@ -757,18 +757,18 @@ static const Widget _network_content_lis
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,   COLOUR_LIGHT_BLUE,   438,   449,   266,   277, 0x0,                                STR_RESIZE_BUTTON },                     // NCLWW_RESIZE
 

	
 
{   WIDGETS_END},
 
};
 

	
 
/** Window description of the content list */
 
static const WindowDesc _network_content_list_desc = {
 
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,
 
	_network_content_list_widgets,
 
};
 
	_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
 
@@ -808,18 +808,18 @@ static const Widget _network_game_window
 

	
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,   COLOUR_LIGHT_BLUE,   438,   449,   252,   263, 0x0,                              STR_RESIZE_BUTTON },
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _network_game_window_desc = {
 
static const WindowDesc _network_game_window_desc(
 
	WDP_CENTER, WDP_CENTER, 450, 264, 780, 264,
 
	WC_NETWORK_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	_network_game_window_widgets,
 
};
 
	_network_game_window_widgets
 
);
 

	
 
void ShowNetworkGameWindow()
 
{
 
	static bool first = true;
 
	DeleteWindowById(WC_NETWORK_WINDOW, 0);
 

	
 
@@ -1132,18 +1132,18 @@ static const Widget _network_start_serve
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,   COLOUR_WHITE,        150,   250,   224,   235, STR_NETWORK_LOAD_GAME,              STR_NETWORK_LOAD_GAME_TIP},            // NSSW_LOAD
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,   COLOUR_WHITE,        260,   360,   224,   235, STR_012E_CANCEL,                    STR_NULL},                             // NSSW_CANCEL
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _network_start_server_window_desc = {
 
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,
 
	_network_start_server_window_widgets,
 
};
 
	_network_start_server_window_widgets
 
);
 

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

	
 
	new NetworkStartServerWindow(&_network_start_server_window_desc);
 
@@ -1358,18 +1358,18 @@ static const Widget _network_lobby_windo
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,   COLOUR_WHITE,        158,   268,   215,   226, STR_NETWORK_REFRESH,         STR_NETWORK_REFRESH_TIP},          // NLWW_REFRESH
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,   COLOUR_WHITE,        278,   388,   200,   211, STR_012E_CANCEL,             STR_NULL},                         // NLWW_CANCEL
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _network_lobby_window_desc = {
 
static const WindowDesc _network_lobby_window_desc(
 
	WDP_CENTER, WDP_CENTER, 420, 235, 420, 235,
 
	WC_NETWORK_WINDOW, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	_network_lobby_window_widgets,
 
};
 
	_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)
 
{
 
	DeleteWindowById(WC_NETWORK_WINDOW, 0);
 
@@ -1419,18 +1419,18 @@ static const Widget _client_list_widgets
 

	
 
static const Widget _client_list_popup_widgets[] = {
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   99,     0,     0,     0, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _client_list_desc = {
 
static const WindowDesc _client_list_desc(
 
	WDP_AUTO, WDP_AUTO, 250, 1, 250, 1,
 
	WC_CLIENT_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON,
 
	_client_list_widgets,
 
};
 
	_client_list_widgets
 
);
 

	
 
/* Finds the Xth client-info that is active */
 
static const NetworkClientInfo *NetworkFindClientInfo(byte client_no)
 
{
 
	const NetworkClientInfo *ci;
 

	
 
@@ -1844,18 +1844,18 @@ static const Widget _network_join_status
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,      0,   249,     0,    13, STR_NETWORK_CONNECTING, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,      0,   249,    14,    84, 0x0,                    STR_NULL},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_WHITE,    75,   175,    69,    80, STR_NETWORK_DISCONNECT, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _network_join_status_window_desc = {
 
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,
 
	_network_join_status_window_widget,
 
};
 
	_network_join_status_window_widget
 
);
 

	
 
void ShowJoinStatusWindow()
 
{
 
	DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 
	new NetworkJoinStatusWindow(&_network_join_status_window_desc);
 
}
 
@@ -1957,18 +1957,18 @@ static const Widget _ncp_window_widgets[
 
{    WWT_TEXTBTN,  RESIZE_NONE,  COLOUR_GREY, 101, 294, 35, 46, STR_MAKE_DEFAULT_COMPANY_PASSWORD, STR_MAKE_DEFAULT_COMPANY_PASSWORD_TIP},
 
{ WWT_PUSHTXTBTN,  RESIZE_NONE,  COLOUR_GREY,   0, 149, 51, 62, STR_012E_CANCEL,                   STR_COMPANY_PASSWORD_CANCEL},
 
{ WWT_PUSHTXTBTN,  RESIZE_NONE,  COLOUR_GREY, 150, 299, 51, 62, STR_012F_OK,                       STR_COMPANY_PASSWORD_OK},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _ncp_window_desc = {
 
static const WindowDesc _ncp_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,
 
	_ncp_window_widgets,
 
};
 
	_ncp_window_widgets
 
);
 

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

	
 
	new NetworkCompanyPasswordWindow(&_ncp_window_desc, parent);
src/newgrf_gui.cpp
Show inline comments
 
@@ -251,18 +251,18 @@ static const Widget _newgrf_add_dlg_widg
 
{ WWT_PUSHTXTBTN,    RESIZE_LRTB,  COLOUR_GREY, 147, 294, 225, 236, STR_NEWGRF_RESCAN_FILES, STR_NEWGRF_RESCAN_FILES_TIP },     // ANGRFW_RESCAN
 
{  WWT_RESIZEBOX,    RESIZE_LRTB,  COLOUR_GREY, 295, 306, 225, 236, 0x0,                     STR_RESIZE_BUTTON },               // ANGRFW_RESIZE
 
{   WIDGETS_END },
 
};
 

	
 
/* Window definition for the add a newgrf window */
 
static const WindowDesc _newgrf_add_dlg_desc = {
 
static const WindowDesc _newgrf_add_dlg_desc(
 
	WDP_CENTER, WDP_CENTER, 307, 237, 307, 337,
 
	WC_SAVELOAD, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
 
	_newgrf_add_dlg_widgets,
 
};
 
	_newgrf_add_dlg_widgets
 
);
 

	
 
static GRFPresetList _grf_preset_list;
 

	
 
class DropDownListPresetItem : public DropDownListItem {
 
public:
 
	DropDownListPresetItem(int result) : DropDownListItem(result, false) {}
 
@@ -750,18 +750,18 @@ static const Widget _newgrf_widgets[] = 
 
{ WWT_PUSHTXTBTN,   RESIZE_RTB,  COLOUR_MAUVE,    0, 287, 251, 262, STR_CONTENT_INTRO_BUTTON,    STR_CONTENT_INTRO_BUTTON_TIP },     // SNGRFS_DOWNLOAD_CONTENT
 
{  WWT_RESIZEBOX,  RESIZE_LRTB,  COLOUR_MAUVE,  288, 299, 251, 262, 0x0,                         STR_RESIZE_BUTTON },                // SNGRFS_RESIZE
 
{ WIDGETS_END },
 
};
 

	
 
/* Window definition of the manage newgrfs window */
 
static const WindowDesc _newgrf_desc = {
 
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,
 
	_newgrf_widgets,
 
};
 
	_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
 
 */
 
static void NewGRFConfirmationCallback(Window *w, bool confirmed)
src/news_gui.cpp
Show inline comments
 
@@ -322,46 +322,46 @@ struct NewsWindow : Window {
 
static const Widget _news_type13_widgets[] = {
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_WHITE,     0,   429,     0,   169, 0x0, STR_NULL},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_WHITE,     0,    10,     0,    11, 0x0, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static WindowDesc _news_type13_desc = {
 
static WindowDesc _news_type13_desc(
 
	WDP_CENTER, 476, 430, 170, 430, 170,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	_news_type13_widgets,
 
};
 
	_news_type13_widgets
 
);
 

	
 
static const Widget _news_type2_widgets[] = {
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_WHITE,     0,   429,     0,   129, 0x0, STR_NULL},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_WHITE,     0,    10,     0,    11, 0x0, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static WindowDesc _news_type2_desc = {
 
static WindowDesc _news_type2_desc(
 
	WDP_CENTER, 476, 430, 130, 430, 130,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	_news_type2_widgets,
 
};
 
	_news_type2_widgets
 
);
 

	
 
static const Widget _news_type0_widgets[] = {
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,     0,   279,    14,    86, 0x0,              STR_NULL},
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,     0,    10,     0,    13, STR_00C5,         STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,    11,   279,     0,    13, STR_012C_MESSAGE, STR_NULL},
 
{      WWT_INSET,   RESIZE_NONE,  COLOUR_LIGHT_BLUE,     2,   277,    16,    64, 0x0,              STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static WindowDesc _news_type0_desc = {
 
static WindowDesc _news_type0_desc(
 
	WDP_CENTER, 476, 280, 87, 280, 87,
 
	WC_NEWS_WINDOW, WC_NONE,
 
	WDF_DEF_WIDGET,
 
	_news_type0_widgets,
 
};
 
	_news_type0_widgets
 
);
 

	
 

	
 
/** Open up an own newspaper window for the news item */
 
static void ShowNewspaper(NewsItem *ni)
 
{
 
	SoundFx sound = _news_type_data[_news_subtype_data[ni->subtype].type].sound;
 
@@ -770,18 +770,18 @@ static const Widget _message_history_wid
 
{      WWT_PANEL,     RESIZE_RB,  COLOUR_BROWN,     0,   387,    14,   139, 0x0,                 STR_MESSAGE_HISTORY_TIP},
 
{  WWT_SCROLLBAR,    RESIZE_LRB,  COLOUR_BROWN,   388,   399,    14,   127, 0x0,                 STR_0190_SCROLL_BAR_SCROLLS_LIST},
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_BROWN,   388,   399,   128,   139, 0x0,                 STR_RESIZE_BUTTON},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _message_history_desc = {
 
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,
 
	_message_history_widgets,
 
};
 
	_message_history_widgets
 
);
 

	
 
/** Display window with news messages history */
 
void ShowMessageHistory()
 
{
 
	DeleteWindowById(WC_MESSAGE_HISTORY, 0);
 
	new MessageHistoryWindow(&_message_history_desc);
 
@@ -979,19 +979,19 @@ NEWS_SETTINGS_LINE(26, NT_ACCEPTANCE,   
 
NEWS_SETTINGS_LINE(26, NT_SUBSIDIES,        STR_020E_SUBSIDIES),
 
NEWS_SETTINGS_LINE(26, NT_GENERAL,          STR_020F_GENERAL_INFORMATION),
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _message_options_desc = {
 
static const WindowDesc _message_options_desc(
 
	270,  22,  410,  65 + NT_END * NEWS_SETTING_BASELINE_SKIP,
 
	           410,  65 + NT_END * NEWS_SETTING_BASELINE_SKIP,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	_message_options_widgets,
 
};
 
	_message_options_widgets
 
);
 

	
 
void ShowMessageOptions()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	new MessageOptionsWindow(&_message_options_desc);
 
}
src/order_gui.cpp
Show inline comments
 
@@ -1178,18 +1178,18 @@ static const Widget _orders_train_widget
 
	{ WWT_PUSHIMGBTN,   RESIZE_LRTB,   COLOUR_GREY,   372,   385,    76,    87, SPR_SHARED_ORDERS_ICON,  STR_VEH_WITH_SHARED_ORDERS_LIST_TIP}, // ORDER_WIDGET_SHARED_ORDER_LIST
 

	
 
	{  WWT_RESIZEBOX,   RESIZE_LRTB,   COLOUR_GREY,   374,   385,    88,    99, 0x0,                     STR_RESIZE_BUTTON},                   // ORDER_WIDGET_RESIZE
 
	{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _orders_train_desc = {
 
static const WindowDesc _orders_train_desc(
 
	WDP_AUTO, WDP_AUTO, 386, 100, 386, 100,
 
	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	_orders_train_widgets,
 
};
 
	_orders_train_widgets
 
);
 

	
 
/**
 
 * Widget definition for "your" orders (!train)
 
 */
 
static const Widget _orders_widgets[] = {
 
	{   WWT_CLOSEBOX,   RESIZE_NONE,   COLOUR_GREY,     0,    10,     0,    13, STR_00C5,                STR_018B_CLOSE_WINDOW},               // ORDER_WIDGET_CLOSEBOX
 
@@ -1223,18 +1223,18 @@ static const Widget _orders_widgets[] = 
 
	{ WWT_PUSHIMGBTN,   RESIZE_LRTB,   COLOUR_GREY,   372,   385,    76,    87, SPR_SHARED_ORDERS_ICON,  STR_VEH_WITH_SHARED_ORDERS_LIST_TIP}, // ORDER_WIDGET_SHARED_ORDER_LIST
 

	
 
	{  WWT_RESIZEBOX,   RESIZE_LRTB,   COLOUR_GREY,   374,   385,    88,    99, 0x0,                     STR_RESIZE_BUTTON},                   // ORDER_WIDGET_RESIZE
 
	{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _orders_desc = {
 
static const WindowDesc _orders_desc(
 
	WDP_AUTO, WDP_AUTO, 386, 100, 386, 100,
 
	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	_orders_widgets,
 
};
 
	_orders_widgets
 
);
 

	
 
/**
 
 * Widget definition for competitor orders
 
 */
 
static const Widget _other_orders_widgets[] = {
 
	{   WWT_CLOSEBOX,   RESIZE_NONE,   COLOUR_GREY,     0,    10,     0,    13, STR_00C5,           STR_018B_CLOSE_WINDOW},               // ORDER_WIDGET_CLOSEBOX
 
@@ -1268,18 +1268,18 @@ static const Widget _other_orders_widget
 
	{      WWT_EMPTY,   RESIZE_TB,     COLOUR_GREY,     0,     0,    76,    87, 0x0,                STR_NULL},                            // ORDER_WIDGET_SHARED_ORDER_LIST
 

	
 
	{  WWT_RESIZEBOX,   RESIZE_LRTB,   COLOUR_GREY,   374,   385,    76,    87, 0x0,                STR_RESIZE_BUTTON},                   // ORDER_WIDGET_RESIZE
 
	{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _other_orders_desc = {
 
static const WindowDesc _other_orders_desc(
 
	WDP_AUTO, WDP_AUTO, 386, 88, 386, 88,
 
	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,
 
	_other_orders_widgets,
 
};
 
	_other_orders_widgets
 
);
 

	
 
void ShowOrdersWindow(const Vehicle *v)
 
{
 
	DeleteWindowById(WC_VEHICLE_DETAILS, v->index, false);
 
	DeleteWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
 
	if (BringWindowToFrontById(WC_VEHICLE_ORDERS, v->index) != NULL) return;
src/osk_gui.cpp
Show inline comments
 
@@ -305,18 +305,18 @@ static const Widget _osk_widgets[] = {
 
{    WWT_PUSHBTN, RESIZE_NONE,  COLOUR_GREY,   210,   225,   103,   118, 0x0,    STR_NULL},
 
{    WWT_PUSHBTN, RESIZE_NONE,  COLOUR_GREY,   228,   243,   103,   118, 0x0,    STR_NULL},
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _osk_desc = {
 
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,
 
	_osk_widgets,
 
};
 
	_osk_widgets
 
);
 

	
 
/**
 
 * Retrieve keyboard layout from language string or (if set) config file.
 
 * Also check for invalid characters.
 
 */
 
void GetKeyboardLayout()
src/rail_gui.cpp
Show inline comments
 
@@ -789,18 +789,18 @@ static const Widget _build_rail_widgets[
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   306,   327,    14,    35, SPR_IMG_REMOVE,                 STR_101E_TOGGLE_BUILD_REMOVE_FOR},        // RTW_REMOVE
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   328,   349,    14,    35, SPR_IMG_CONVERT_RAIL,           STR_CONVERT_RAIL_TIP},                    // RTW_CONVERT_RAIL
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_rail_desc = {
 
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,
 
	_build_rail_widgets,
 
};
 
	_build_rail_widgets
 
);
 

	
 

	
 
/** Configures the rail toolbar for railtype given
 
 * @param railtype the railtype to display
 
 * @param w the window to modify
 
 */
 
@@ -1331,26 +1331,26 @@ static const Widget _newstation_builder_
 
{     WWT_MATRIX,   RESIZE_NONE,  COLOUR_GREY,         7,   128,    32,   102, 0x501,                           STR_SELECT_STATION_TYPE_TIP},         // BRSW_NEWST_LIST
 
{  WWT_SCROLLBAR,   RESIZE_NONE,  COLOUR_GREY,       129,   140,    32,   102, 0x0,                             STR_0190_SCROLL_BAR_SCROLLS_LIST},    // BRSW_NEWST_SCROLL
 
{   WIDGETS_END},
 
};
 

	
 
/** High level window description of the default station-build window */
 
static const WindowDesc _station_builder_desc = {
 
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,
 
	_station_builder_widgets,
 
};
 
	_station_builder_widgets
 
);
 

	
 
/** High level window description of the newGRF station-build window */
 
static const WindowDesc _newstation_builder_desc = {
 
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,
 
	_newstation_builder_widgets,
 
};
 
	_newstation_builder_widgets
 
);
 

	
 
/** Open station build window */
 
static void ShowStationBuilder(Window *parent)
 
{
 
	if (GetNumStationClasses() <= 2 && GetNumCustomStations(STAT_CLASS_DFLT) == 1) {
 
		new BuildRailStationWindow(&_station_builder_desc, parent, false);
 
@@ -1508,18 +1508,18 @@ static const Widget _signal_builder_widg
 
{ WWT_PUSHIMGBTN,   RESIZE_NONE,  COLOUR_GREY,       143, 151,  54,  65, SPR_ARROW_RIGHT,        STR_DRAG_SIGNALS_DENSITY_INCREASE_TIP}, // BSW_DRAG_SIGNALS_DENSITY_INCREASE
 

	
 
{   WIDGETS_END},
 
};
 

	
 
/** Signal selection window description */
 
static const WindowDesc _signal_builder_desc = {
 
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,
 
	_signal_builder_widgets,
 
};
 
	_signal_builder_widgets
 
);
 

	
 
/**
 
 * Open the signal selection window
 
 */
 
static void ShowSignalBuilder(Window *parent)
 
{
 
@@ -1582,18 +1582,18 @@ static const Widget _build_depot_widgets
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,        71,   136,    69,   118, 0x0,                              STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, // BRDW_DEPOT_SE
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,         3,    68,    69,   118, 0x0,                              STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, // BRDW_DEPOT_SW
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,         3,    68,    17,    66, 0x0,                              STR_1020_SELECT_RAILROAD_DEPOT_ORIENTATIO}, // BRDW_DEPOT_NW
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_depot_desc = {
 
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,
 
	_build_depot_widgets,
 
};
 
	_build_depot_widgets
 
);
 

	
 
static void ShowBuildTrainDepotPicker(Window *parent)
 
{
 
	new BuildRailDepotWindow(&_build_depot_desc, parent);
 
}
 

	
 
@@ -1683,18 +1683,18 @@ static const Widget _build_waypoint_widg
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_DARK_GREEN,   275,   340,    17,    76, 0x0,          STR_WAYPOINT_GRAPHICS_TIP},        // BRWW_WAYPOINT_5
 

	
 
{ WWT_HSCROLLBAR,   RESIZE_NONE,  COLOUR_DARK_GREEN,     1,   343,     80,    91, 0x0,          STR_HSCROLL_BAR_SCROLLS_LIST},     // BRWW_SCROLL
 
{    WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_waypoint_desc = {
 
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,
 
	_build_waypoint_widgets,
 
};
 
	_build_waypoint_widgets
 
);
 

	
 
static void ShowBuildWaypointPicker(Window *parent)
 
{
 
	new BuildRailWaypointWindow(&_build_waypoint_desc, parent);
 
}
 

	
src/road_gui.cpp
Show inline comments
 
@@ -641,18 +641,18 @@ static const Widget _build_road_widgets[
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   219,   240,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},        // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   241,   262,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR},  // RTW_REMOVE
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_road_desc = {
 
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,
 
	_build_road_widgets,
 
};
 
	_build_road_widgets
 
);
 

	
 
/** Widget definition of the build tram toolbar */
 
static const Widget _build_tramway_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_DARK_GREEN,     0,    10,     0,    13, STR_00C5,                       STR_018B_CLOSE_WINDOW},                // RTW_CLOSEBOX
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_DARK_GREEN,    11,   228,     0,    13, STR_WHITE_TRAMWAY_CONSTRUCTION, STR_018C_WINDOW_TITLE_DRAG_THIS},      // RTW_CAPTION
 
{  WWT_STICKYBOX,   RESIZE_NONE,  COLOUR_DARK_GREEN,   229,   240,     0,    13, 0x0,                            STR_STICKY_BUTTON},                    // RTW_STICKY
 
@@ -669,18 +669,18 @@ static const Widget _build_tramway_widge
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   197,   218,    14,    35, SPR_IMG_ROAD_TUNNEL,            STR_BUILD_TRAMWAY_TUNNEL},             // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   219,   240,    14,    35, SPR_IMG_REMOVE,                 STR_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS}, // RTW_REMOVE
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_tramway_desc = {
 
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,
 
	_build_tramway_widgets,
 
};
 
	_build_tramway_widgets
 
);
 

	
 
void ShowBuildRoadToolbar(RoadType roadtype)
 
{
 
	if (!IsValidCompanyID(_local_company)) return;
 
	_cur_roadtype = roadtype;
 

	
 
@@ -705,18 +705,18 @@ static const Widget _build_road_scen_wid
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   110,   152,    14,    35, SPR_IMG_BRIDGE,             STR_180F_BUILD_ROAD_BRIDGE},       // RTW_BUILD_BRIDGE
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   153,   174,    14,    35, SPR_IMG_ROAD_TUNNEL,        STR_1810_BUILD_ROAD_TUNNEL},       // RTW_BUILD_TUNNEL
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN,   175,   196,    14,    35, SPR_IMG_REMOVE,             STR_1811_TOGGLE_BUILD_REMOVE_FOR}, // RTW_REMOVE
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_road_scen_desc = {
 
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,
 
	_build_road_scen_widgets,
 
};
 
	_build_road_scen_widgets
 
);
 

	
 
void ShowBuildRoadScenToolbar()
 
{
 
	_cur_roadtype = ROADTYPE_ROAD;
 
	AllocateWindowDescFront<BuildRoadToolbarWindow>(&_build_road_scen_desc, 0);
 
}
 
@@ -784,18 +784,18 @@ static const Widget _build_road_depot_wi
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,         71,   136,    69,   118, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, // BRDW_DEPOT_SE
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,          3,    68,    69,   118, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, // BRDW_DEPOT_SW
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,          3,    68,    17,    66, 0x0,                             STR_1813_SELECT_ROAD_VEHICLE_DEPOT}, // BRDW_DEPOT_NW
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_road_depot_desc = {
 
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,
 
	_build_road_depot_widgets,
 
};
 
	_build_road_depot_widgets
 
);
 

	
 
static void ShowRoadDepotPicker(Window *parent)
 
{
 
	new BuildRoadDepotWindow(&_build_road_depot_desc, parent);
 
}
 

	
 
@@ -932,18 +932,18 @@ static const Widget _rv_station_picker_w
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,        10,    69,   133,   144, STR_02DB_OFF,                     STR_3065_DON_T_HIGHLIGHT_COVERAGE}, // BRSW_LT_OFF
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,        70,   129,   133,   144, STR_02DA_ON,                      STR_3064_HIGHLIGHT_COVERAGE_AREA},  // BRSW_LT_ON
 
{      WWT_LABEL,   RESIZE_NONE,  COLOUR_DARK_GREEN,   0,   139,   120,   133, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL},                          // BRSW_INFO
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _rv_station_picker_desc = {
 
static const WindowDesc _rv_station_picker_desc(
 
	WDP_AUTO, WDP_AUTO, 207, 177, 207, 177,
 
	WC_BUS_STATION, WC_BUILD_TOOLBAR,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION,
 
	_rv_station_picker_widgets,
 
};
 
	_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
 
@@ -349,18 +349,18 @@ static const Widget _game_options_widget
 
{      WWT_FRAME,   RESIZE_NONE,  COLOUR_GREY,    10,   179,   197,   232, STR_OPTIONS_BASE_GRF,              STR_NULL},
 
{ WWT_DROPDOWNIN,   RESIZE_NONE,  COLOUR_GREY,    20,   169,   211,   222, STR_OPTIONS_BASE_GRF_CBO,          STR_OPTIONS_BASE_GRF_TIP},
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _game_options_desc = {
 
static const WindowDesc _game_options_desc(
 
	WDP_CENTER, WDP_CENTER, 370, 243, 370, 243,
 
	WC_GAME_OPTIONS, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
 
	_game_options_widgets,
 
};
 
	_game_options_widgets
 
);
 

	
 

	
 
void ShowGameOptions()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	new GameOptionsWindow(&_game_options_desc);
 
@@ -383,18 +383,18 @@ static const Widget _game_difficulty_wid
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_YELLOW,   105,   185,   265,   276, STR_OPTIONS_SAVE_CHANGES,     STR_NULL},                        // GDW_ACCEPT
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_YELLOW,   186,   266,   265,   276, STR_012E_CANCEL,              STR_NULL},                        // GDW_CANCEL
 
{   WIDGETS_END},
 
};
 

	
 
/* Window definition for the game difficulty settings window */
 
static const WindowDesc _game_difficulty_desc = {
 
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,
 
	_game_difficulty_widgets,
 
};
 
	_game_difficulty_widgets
 
);
 

	
 
void SetDifficultyLevel(int mode, DifficultySettings *gm_opt);
 

	
 
struct GameDifficultyWindow : public Window {
 
private:
 
	static const uint GAME_DIFFICULTY_NUM = 18;
 
@@ -1426,18 +1426,18 @@ static const Widget _settings_selection_
 
{      WWT_PANEL,     RESIZE_RB,  COLOUR_MAUVE,     0,   399,    14,   187, 0x0,                             STR_NULL}, // SETTINGSEL_OPTIONSPANEL
 
{  WWT_SCROLLBAR,    RESIZE_LRB,  COLOUR_MAUVE,   400,   411,    14,   175, 0x0,                             STR_0190_SCROLL_BAR_SCROLLS_LIST}, // SETTINGSEL_SCROLLBAR
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_MAUVE,   400,   411,   176,   187, 0x0,                             STR_RESIZE_BUTTON}, // SETTINGSEL_RESIZE
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _settings_selection_desc = {
 
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,
 
	_settings_selection_widgets,
 
};
 
	_settings_selection_widgets
 
);
 

	
 
void ShowGameSettings()
 
{
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	new GameSettingsWindow(&_settings_selection_desc);
 
}
 
@@ -1659,18 +1659,18 @@ static const Widget _cust_currency_widge
 
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_GREY,     0,    10,     0,    13, STR_00C5,            STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,  COLOUR_GREY,    11,   229,     0,    13, STR_CURRENCY_WINDOW, STR_018C_WINDOW_TITLE_DRAG_THIS},
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,     0,   229,    14,   119, 0x0,                 STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _cust_currency_desc = {
 
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,
 
	_cust_currency_widgets,
 
};
 
	_cust_currency_widgets
 
);
 

	
 
static void ShowCustCurrency()
 
{
 
	DeleteWindowById(WC_CUSTOM_CURRENCY, 0);
 
	new CustomCurrencyWindow(&_cust_currency_desc);
 
}
src/signs_gui.cpp
Show inline comments
 
@@ -148,18 +148,18 @@ static const Widget _sign_list_widget[] 
 
{      WWT_PANEL,     RESIZE_RB,  COLOUR_GREY,     0,   345,    14,   137, 0x0,                   STR_NULL},
 
{  WWT_SCROLLBAR,    RESIZE_LRB,  COLOUR_GREY,   346,   357,    14,   125, 0x0,                   STR_0190_SCROLL_BAR_SCROLLS_LIST},
 
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_GREY,   346,   357,   126,   137, 0x0,                   STR_RESIZE_BUTTON},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _sign_list_desc = {
 
static const WindowDesc _sign_list_desc(
 
	WDP_AUTO, WDP_AUTO, 358, 138, 358, 138,
 
	WC_SIGN_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	_sign_list_widget,
 
};
 
	_sign_list_widget
 
);
 

	
 

	
 
void ShowSignList()
 
{
 
	AllocateWindowDescFront<SignListWindow>(&_sign_list_desc, 0);
 
}
 
@@ -328,18 +328,18 @@ static const Widget _query_sign_edit_wid
 
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY, 181, 237,  30,  41, STR_NULL,          STR_NULL },
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 238, 248,  30,  41, STR_6819,          STR_PREVIOUS_SIGN_TOOLTIP },
 
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 249, 259,  30,  41, STR_681A,          STR_NEXT_SIGN_TOOLTIP },
 
{ WIDGETS_END },
 
};
 

	
 
static const WindowDesc _query_sign_edit_desc = {
 
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,
 
	_query_sign_edit_widgets,
 
};
 
	_query_sign_edit_widgets
 
);
 

	
 
void HandleClickOnSign(const Sign *si)
 
{
 
	if (_ctrl_pressed && si->owner == _local_company) {
 
		RenameSign(si->index, NULL);
 
		return;
src/smallmap_gui.cpp
Show inline comments
 
@@ -1052,18 +1052,18 @@ public:
 
	}
 
};
 

	
 
SmallMapWindow::SmallMapType SmallMapWindow::map_type = SMT_CONTOUR;
 
bool SmallMapWindow::show_towns = true;
 

	
 
static const WindowDesc _smallmap_desc = {
 
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,
 
	_smallmap_widgets,
 
};
 
	_smallmap_widgets
 
);
 

	
 
void ShowSmallMap()
 
{
 
	AllocateWindowDescFront<SmallMapWindow>(&_smallmap_desc, 0);
 
}
 

	
 
@@ -1194,18 +1194,18 @@ public:
 
	{
 
		/* Only handle zoom message if intended for us (msg ZOOM_IN/ZOOM_OUT) */
 
		HandleZoomMessage(this, this->viewport, EVW_ZOOMIN, EVW_ZOOMOUT);
 
	}
 
};
 

	
 
static const WindowDesc _extra_view_port_desc = {
 
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,
 
	_extra_view_port_widgets,
 
};
 
	_extra_view_port_widgets
 
);
 

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

	
 
	/* find next free window number for extra viewport */
src/station_gui.cpp
Show inline comments
 
@@ -609,18 +609,18 @@ static const Widget _company_stations_wi
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,     0,    80,    25,    36, STR_SORT_BY,       STR_SORT_ORDER_TIP},               // SLW_SORTBY
 
{   WWT_DROPDOWN,   RESIZE_NONE,  COLOUR_GREY,    81,   243,    25,    36, 0x0,               STR_SORT_CRITERIA_TIP},            // SLW_SORTDROPBTN
 
{      WWT_PANEL,  RESIZE_RIGHT,  COLOUR_GREY,   244,   357,    25,    36, 0x0,               STR_NULL},                         // SLW_PAN_SORT_RIGHT
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _company_stations_desc = {
 
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,
 
	_company_stations_widgets,
 
};
 
	_company_stations_widgets
 
);
 

	
 
/**
 
 * Opens window with list of company's stations
 
 *
 
 * @param company whose stations' list show
 
 */
 
@@ -980,18 +980,18 @@ struct StationViewWindow : public Window
 
		if (delta.x != 0) ResizeButtons(this, SVW_LOCATION, SVW_RENAME);
 
		this->vscroll.cap += delta.y / (int)this->resize.step_height;
 
	}
 
};
 

	
 

	
 
static const WindowDesc _station_view_desc = {
 
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,
 
	_station_view_widgets,
 
};
 
	_station_view_widgets
 
);
 

	
 
/**
 
 * Opens StationViewWindow for given station
 
 *
 
 * @param station station which window should be opened
 
 */
 
@@ -1196,18 +1196,18 @@ struct SelectStationWindow : Window {
 
	{
 
		FindStationsNearby(this->tile, this->size_x, this->size_y, true);
 
		this->SetDirty();
 
	}
 
};
 

	
 
static const WindowDesc _select_station_desc = {
 
static const WindowDesc _select_station_desc(
 
	WDP_AUTO, WDP_AUTO, 200, 92, 200, 182,
 
	WC_SELECT_STATION, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE | WDF_CONSTRUCTION,
 
	_select_station_widgets,
 
};
 
	_select_station_widgets
 
);
 

	
 

	
 
/**
 
 * Check whether we need to show the station selection window.
 
 * @param cmd Command to build the station.
 
 * @param w Width of the to-be-built station
src/statusbar_gui.cpp
Show inline comments
 
@@ -179,18 +179,18 @@ static const Widget _main_status_widgets
 
{      WWT_PANEL,   RESIZE_NONE,   COLOUR_GREY,     0,   139,     0,    11, 0x0, STR_NULL},
 
{    WWT_PUSHBTN,   RESIZE_RIGHT,  COLOUR_GREY,   140,   179,     0,    11, 0x0, STR_02B7_SHOW_LAST_MESSAGE_OR_NEWS},
 
{    WWT_PUSHBTN,   RESIZE_LR,     COLOUR_GREY,   180,   319,     0,    11, 0x0, STR_NULL},
 
{   WIDGETS_END},
 
};
 

	
 
static WindowDesc _main_status_desc = {
 
static 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,
 
	_main_status_widgets,
 
};
 
	_main_status_widgets
 
);
 

	
 
/**
 
 * Checks whether the news ticker is currently being used.
 
 */
 
bool IsNewsTickerShown()
 
{
src/subsidy_gui.cpp
Show inline comments
 
@@ -178,18 +178,18 @@ static const Widget _subsidies_list_widg
 
{  WWT_SCROLLBAR, RESIZE_LRB,    COLOUR_BROWN, 308, 319,  14, 114, 0x0,                STR_0190_SCROLL_BAR_SCROLLS_LIST},
 
{  WWT_RESIZEBOX, RESIZE_LRTB,   COLOUR_BROWN, 308, 319, 115, 126, 0x0,                STR_RESIZE_BUTTON},
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _subsidies_list_desc = {
 
static const WindowDesc _subsidies_list_desc(
 
	WDP_AUTO, WDP_AUTO, 320, 127, 320, 127,
 
	WC_SUBSIDIES_LIST, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE,
 
	_subsidies_list_widgets,
 
};
 
	_subsidies_list_widgets
 
);
 

	
 

	
 
void ShowSubsidiesList()
 
{
 
	AllocateWindowDescFront<SubsidyListWindow>(&_subsidies_list_desc, 0);
 
}
src/terraform_gui.cpp
Show inline comments
 
@@ -322,18 +322,18 @@ static const Widget _terraform_widgets[]
 
{   WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN, 114, 135,  14,  35, SPR_IMG_PLANTTREES,      STR_0185_PLANT_TREES_PLACE_SIGNS},  // TTW_PLANT_TREES
 
{   WWT_IMGBTN,   RESIZE_NONE,  COLOUR_DARK_GREEN, 136, 157,  14,  35, SPR_IMG_SIGN,            STR_0289_PLACE_SIGN},               // TTW_PLACE_SIGN
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _terraform_desc = {
 
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,
 
	_terraform_widgets,
 
};
 
	_terraform_widgets
 
);
 

	
 
void ShowTerraformToolbar(Window *link)
 
{
 
	if (!IsValidCompanyID(_local_company)) return;
 

	
 
	Window *w = AllocateWindowDescFront<TerraformToolbarWindow>(&_terraform_desc, 0);
 
@@ -703,17 +703,17 @@ struct ScenarioEditorLandscapeGeneration
 
	{
 
		this->RaiseButtons();
 
		this->SetDirty();
 
	}
 
};
 

	
 
static const WindowDesc _scen_edit_land_gen_desc = {
 
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,
 
	_scen_edit_land_gen_widgets,
 
};
 
	_scen_edit_land_gen_widgets
 
);
 

	
 
void ShowEditorTerraformToolbar()
 
{
 
	AllocateWindowDescFront<ScenarioEditorLandscapeGenerationWindow>(&_scen_edit_land_gen_desc, 0);
 
}
src/timetable_gui.cpp
Show inline comments
 
@@ -351,18 +351,18 @@ static const Widget _timetable_widgets[]
 
	{      WWT_PANEL,   RESIZE_RTB,    COLOUR_GREY,   388,   387,   118,   129, STR_NULL,                   STR_NULL},                             // TTV_EMPTY
 
	{  WWT_RESIZEBOX,   RESIZE_LRTB,   COLOUR_GREY,   388,   399,   118,   129, STR_NULL,                   STR_RESIZE_BUTTON},                    // TTV_RESIZE
 

	
 
	{    WIDGETS_END }
 
};
 

	
 
static const WindowDesc _timetable_desc = {
 
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,
 
	_timetable_widgets,
 
};
 
	_timetable_widgets
 
);
 

	
 
void ShowTimetableWindow(const Vehicle *v)
 
{
 
	DeleteWindowById(WC_VEHICLE_DETAILS, v->index, false);
 
	DeleteWindowById(WC_VEHICLE_ORDERS, v->index, false);
 
	AllocateWindowDescFront<TimetableWindow>(&_timetable_desc, v->index);
src/toolbar_gui.cpp
Show inline comments
 
@@ -1177,18 +1177,18 @@ static const Widget _toolb_normal_widget
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_GREY,     0,     0,     0,    21, SPR_IMG_MESSAGES,        STR_0203_SHOW_LAST_MESSAGE_NEWS},   // TBN_NEWSREPORT
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_GREY,     0,     0,     0,    21, SPR_IMG_QUERY,           STR_0186_LAND_BLOCK_INFORMATION},   // TBN_HELP
 
{     WWT_IMGBTN,   RESIZE_NONE,  COLOUR_GREY,     0,     0,     0,    21, SPR_SWITCH_TOOLBAR,      STR_EMPTY},                         // TBN_SWITCHBAR
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _toolb_normal_desc = {
 
static const WindowDesc _toolb_normal_desc(
 
	0, 0, 0, TBP_BUTTONHEIGHT, 640, TBP_BUTTONHEIGHT,
 
	WC_MAIN_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_NO_FOCUS,
 
	_toolb_normal_widgets,
 
};
 
	_toolb_normal_widgets
 
);
 

	
 

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

	
 
static ToolbarButtonProc * const _scen_toolbar_button_procs[] = {
 
	ToolbarPauseClick,
 
@@ -1430,18 +1430,18 @@ static const Widget _toolb_scen_widgets[
 
{  WWT_IMGBTN, RESIZE_NONE,  COLOUR_GREY,   0,   0,  0, 21, SPR_IMG_MUSIC,       STR_01D4_SHOW_SOUND_MUSIC_WINDOW},
 
{   WWT_EMPTY, RESIZE_NONE,  COLOUR_GREY,   0,   0,  0,  0, 0x0,                 STR_NULL},
 
{  WWT_IMGBTN, RESIZE_NONE,  COLOUR_GREY,   0,   0,  0, 21, SPR_IMG_QUERY,       STR_0186_LAND_BLOCK_INFORMATION},
 
{WIDGETS_END},
 
};
 

	
 
static const WindowDesc _toolb_scen_desc = {
 
static const WindowDesc _toolb_scen_desc(
 
	0, 0, 130, TBP_BUTTONHEIGHT, 640, TBP_BUTTONHEIGHT,
 
	WC_MAIN_TOOLBAR, WC_NONE,
 
	WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_NO_FOCUS,
 
	_toolb_scen_widgets,
 
};
 
	_toolb_scen_widgets
 
);
 

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

	
 
void AllocateToolbar()
 
{
 
	/* Clean old GUI values; railtype is (re)set by rail_gui.cpp */
src/town_gui.cpp
Show inline comments
 
@@ -202,18 +202,18 @@ public:
 
	virtual void OnHundredthTick()
 
	{
 
		this->SetDirty();
 
	}
 
};
 

	
 
static const WindowDesc _town_authority_desc = {
 
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,
 
	_town_authority_widgets,
 
};
 
	_town_authority_widgets
 
);
 

	
 
static void ShowTownAuthorityWindow(uint town)
 
{
 
	AllocateWindowDescFront<TownAuthorityWindow>(&_town_authority_desc, town);
 
}
 

	
 
@@ -429,18 +429,18 @@ static const Widget _town_view_widgets[]
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_BROWN,   172,   247,     0,    13, STR_0130_RENAME,          STR_200C_CHANGE_TOWN_NAME},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_BROWN,    86,   171,   138,   149, STR_023C_EXPAND,          STR_023B_INCREASE_SIZE_OF_TOWN},
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_BROWN,   172,   259,   138,   149, STR_0290_DELETE,          STR_0291_DELETE_THIS_TOWN_COMPLETELY},
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _town_view_desc = {
 
static const WindowDesc _town_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,
 
	_town_view_widgets,
 
};
 
	_town_view_widgets
 
);
 

	
 
void ShowTownViewWindow(TownID town)
 
{
 
	AllocateWindowDescFront<TownViewWindow>(&_town_view_desc, town);
 
}
 

	
 
@@ -646,18 +646,18 @@ const Town *TownDirectoryWindow::last_to
 
/* Available town directory sorting functions */
 
GUITownList::SortFunction * const TownDirectoryWindow::sorter_funcs[] = {
 
	&TownNameSorter,
 
	&TownPopulationSorter,
 
};
 

	
 
static const WindowDesc _town_directory_desc = {
 
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,
 
	_town_directory_widgets,
 
};
 
	_town_directory_widgets
 
);
 

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

	
 
TownSize FoundTownWindow::town_size = TS_MEDIUM; // select medium-sized towns per default;
 
bool FoundTownWindow::city;
 
TownLayout FoundTownWindow::town_layout;
 

	
 
static const WindowDesc _found_town_desc = {
 
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,
 
	_found_town_widgets,
 
};
 
	_found_town_widgets
 
);
 

	
 
void ShowBuildTownWindow()
 
{
 
	if (_game_mode != GM_EDITOR && !IsValidCompanyID(_local_company)) return;
 
	AllocateWindowDescFront<FoundTownWindow>(&_found_town_desc, 0);
 
}
src/transparency_gui.cpp
Show inline comments
 
@@ -110,17 +110,17 @@ static const Widget _transparency_widget
 

	
 
{    WWT_PANEL,   RESIZE_NONE,  COLOUR_DARK_GREEN,   0, 218,  36,  48, 0x0,                  STR_TRANSPARENT_INVISIBLE_DESC},
 

	
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _transparency_desc = {
 
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,
 
	_transparency_widgets,
 
};
 
	_transparency_widgets
 
);
 

	
 
void ShowTransparencyToolbar(void)
 
{
 
	AllocateWindowDescFront<TransparenciesWindow>(&_transparency_desc, 0);
 
}
src/tree_gui.cpp
Show inline comments
 
@@ -168,18 +168,18 @@ static const Widget _build_trees_widgets
 
{      WWT_PANEL,   RESIZE_NONE,  COLOUR_GREY,       107,   140,   110,   155, 0x0,                   STR_280D_SELECT_TREE_TYPE_TO_PLANT}, // BTW_TYPE_34
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,         2,   140,   157,   168, STR_TREES_RANDOM_TYPE, STR_TREES_RANDOM_TYPE_TIP},          // BTW_TYPE_RANDOM
 
{    WWT_TEXTBTN,   RESIZE_NONE,  COLOUR_GREY,         2,   140,   170,   181, STR_028A_RANDOM_TREES, STR_028B_PLANT_TREES_RANDOMLY_OVER}, // BTW_MANY_RANDOM
 
{    WIDGETS_END},
 
};
 

	
 
static const WindowDesc _build_trees_desc = {
 
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,
 
	_build_trees_widgets,
 
};
 
	_build_trees_widgets
 
);
 

	
 
void ShowBuildTreesToolbar()
 
{
 
	if (_game_mode != GM_EDITOR && !IsValidCompanyID(_local_company)) return;
 
	AllocateWindowDescFront<BuildTreesWindow>(&_build_trees_desc, 0);
 
}
src/vehicle_gui.cpp
Show inline comments
 
@@ -409,18 +409,18 @@ static const Widget _vehicle_refit_widge
 
	{      WWT_PANEL,     RESIZE_TB,  COLOUR_GREY,     0,   239,   140,   161, 0x0,                                 STR_NULL},
 
	{ WWT_PUSHTXTBTN,     RESIZE_TB,  COLOUR_GREY,     0,   227,   162,   173, 0x0,                                 STR_NULL},
 
	{  WWT_RESIZEBOX,     RESIZE_TB,  COLOUR_GREY,   228,   239,   162,   173, 0x0,                                 STR_RESIZE_BUTTON},
 
	{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _vehicle_refit_desc = {
 
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,
 
	_vehicle_refit_widgets,
 
};
 
	_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 ( ? )
 
 */
 
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent)
 
@@ -1131,18 +1131,18 @@ struct VehicleListWindow : public BaseVe
 
		} else {
 
			this->vehicles.ForceResort();
 
		}
 
	}
 
};
 

	
 
static WindowDesc _vehicle_list_desc = {
 
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,
 
	_vehicle_list_widgets,
 
};
 
	_vehicle_list_widgets
 
);
 

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

	
 
	_vehicle_list_desc.cls = GetWindowClassForVehicleType(vehicle_type);
 
@@ -1541,18 +1541,18 @@ struct VehicleDetailsWindow : Window {
 
		this->vscroll.cap += delta.y / 14;
 
		this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.cap << 8) + 1;
 
	}
 
};
 

	
 
/** Vehicle details window descriptor. */
 
static const WindowDesc _vehicle_details_desc = {
 
static const WindowDesc _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,
 
	_vehicle_details_widgets,
 
};
 
	_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);
 
	DeleteWindowById(WC_VEHICLE_TIMETABLE, v->index, false);
 
@@ -1582,28 +1582,28 @@ static const Widget _vehicle_view_widget
 
	{ WWT_PUSHIMGBTN,    RESIZE_LR,  COLOUR_GREY, 232, 249,  50,  67, SPR_IGNORE_SIGNALS,       STR_884A_FORCE_TRAIN_TO_PROCEED },       // VVW_WIDGET_FORCE_PROCEED
 
{   WIDGETS_END},
 
};
 

	
 

	
 
/** Vehicle view window descriptor for all vehicles but trains. */
 
static const WindowDesc _vehicle_view_desc = {
 
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,
 
	_vehicle_view_widgets,
 
};
 
	_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 = {
 
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,
 
	_vehicle_view_widgets,
 
};
 
	_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);
 
assert_compile(VEH_ROAD == 1);
src/waypoint_gui.cpp
Show inline comments
 
@@ -108,18 +108,18 @@ static const Widget _waypoint_view_widge
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,     0,   121,   106,   117, STR_00E4_LOCATION,     STR_3053_CENTER_MAIN_VIEW_ON_STATION},  // WAYPVW_CENTERVIEW
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   122,   244,   106,   117, STR_0130_RENAME,       STR_CHANGE_WAYPOINT_NAME},              // WAYPVW_RENAME
 
{ WWT_PUSHTXTBTN,   RESIZE_NONE,  COLOUR_GREY,   245,   259,   106,   117, STR_TRAIN,             STR_SCHEDULED_TRAINS_TIP },             // WAYPVW_SHOW_TRAINS
 
{   WIDGETS_END},
 
};
 

	
 
static const WindowDesc _waypoint_view_desc = {
 
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,
 
	_waypoint_view_widgets,
 
};
 
	_waypoint_view_widgets
 
);
 

	
 
void ShowWaypointWindow(const Waypoint *wp)
 
{
 
	if (!wp->IsValid()) return;  // little safety
 
	AllocateWindowDescFront<WaypointWindow>(&_waypoint_view_desc, wp->index);
 
}
src/window.cpp
Show inline comments
 
@@ -49,12 +49,29 @@ byte _scroller_click_timeout;
 

	
 
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)
 
{
 
	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;
 
}
 

	
 

	
 
/**
 
 * Set the window that has the focus
 
 * @param w The window to set the focus on
 
 */
 
void SetFocusedWindow(Window *w)
 
{
src/window_gui.h
Show inline comments
 
@@ -35,13 +35,17 @@ extern Window *_z_front_window;
 
extern Window *_z_back_window;
 
extern Window *_focused_window;
 

	
 
/**
 
 * High level window description
 
 */
 
struct WindowDesc {
 
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);
 

	
 
	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()
 
	int16 minimum_width;    ///< Minimal width of the window
 
	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
0 comments (0 inline, 0 general)