summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-12-21 16:24:29 +0000
committeralberth <alberth@openttd.org>2009-12-21 16:24:29 +0000
commit91872aca4836c4e07808548b5a6d370a06734d58 (patch)
treebcb9fde256b0cdf8210a0120601e3cabce93c05f
parentf55c3312b3a343362548234a7bcf712ec7f15285 (diff)
downloadopenttd-91872aca4836c4e07808548b5a6d370a06734d58.tar.xz
(svn r18588) -Feature [FS#2943]: Add shading and unshading of windows.
-rw-r--r--src/ai/ai_gui.cpp3
-rw-r--r--src/autoreplace_gui.cpp4
-rw-r--r--src/build_vehicle_gui.cpp3
-rw-r--r--src/cheat_gui.cpp2
-rw-r--r--src/company_gui.cpp104
-rw-r--r--src/depot_gui.cpp1
-rw-r--r--src/graph_gui.cpp9
-rw-r--r--src/group_gui.cpp1
-rw-r--r--src/industry_gui.cpp5
-rw-r--r--src/news_gui.cpp1
-rw-r--r--src/order_gui.cpp27
-rw-r--r--src/signs_gui.cpp3
-rw-r--r--src/smallmap_gui.cpp1
-rw-r--r--src/station_gui.cpp10
-rw-r--r--src/subsidy_gui.cpp1
-rw-r--r--src/terraform_gui.cpp1
-rw-r--r--src/timetable_gui.cpp1
-rw-r--r--src/town_gui.cpp9
-rw-r--r--src/tree_gui.cpp1
-rw-r--r--src/vehicle_gui.cpp4
-rw-r--r--src/viewport_gui.cpp1
-rw-r--r--src/waypoint_gui.cpp1
22 files changed, 123 insertions, 70 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 5aab3eaff..83c121b0c 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -749,6 +749,8 @@ struct AIDebugWindow : public Window {
/* Draw standard stuff */
this->DrawWidgets();
+ if (this->IsShaded()) return; // Don't draw anything when the window is shaded.
+
/* If there are no active companies, don't display anything else. */
if (ai_debug_company == INVALID_COMPANY) return;
@@ -918,6 +920,7 @@ static const NWidgetPart _nested_ai_debug_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, AID_WIDGET_VIEW),
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 9bcde4c02..cdfaff1e6 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -392,7 +392,7 @@ public:
needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
}
}
- if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
+ if (!this->IsShaded() && needed_height != this->details_height) { // Details window are not high enough, enlarge them.
this->details_height = needed_height;
this->ReInit();
return;
@@ -501,6 +501,7 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, RVW_WIDGET_CAPTION), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
@@ -540,6 +541,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, RVW_WIDGET_CAPTION), SetMinimalSize(433, 14), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index d99bdea13..9a8bb4320 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -63,6 +63,7 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CAPTION), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
@@ -1128,7 +1129,7 @@ struct BuildVehicleWindow : Window {
needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
}
}
- if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
+ if (!this->IsShaded() && needed_height != this->details_height) { // Details window are not high enough, enlarge them.
this->details_height = needed_height;
this->ReInit();
return;
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp
index 5240ae4fc..23e8cc7f7 100644
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -140,6 +140,8 @@ static const NWidgetPart _nested_cheat_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_CHEATS, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
+ NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, CW_PANEL), SetDataTip(0x0, STR_CHEATS_TOOLTIP), EndContainer(),
};
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 9ef68b697..8a8016d51 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -230,6 +230,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, CFW_CAPTION), SetDataTip(STR_FINANCES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_IMGBTN, COLOUR_GREY, CFW_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, CFW_SEL_PANEL),
@@ -402,29 +403,31 @@ struct CompanyFinancesWindow : Window {
virtual void OnPaint()
{
- if (!small) {
- /* Check that the expenses panel height matches the height needed for the layout. */
- int type = _settings_client.gui.expenses_layout;
- if (_expenses_list_types[type].GetHeight() != this->GetWidget<NWidgetBase>(CFW_EXPS_CATEGORY)->current_y) {
+ if (!this->IsShaded()) {
+ if (!small) {
+ /* Check that the expenses panel height matches the height needed for the layout. */
+ int type = _settings_client.gui.expenses_layout;
+ if (_expenses_list_types[type].GetHeight() != this->GetWidget<NWidgetBase>(CFW_EXPS_CATEGORY)->current_y) {
+ this->SetupWidgets();
+ this->ReInit();
+ return;
+ }
+ }
+
+ /* Check that the loan buttons are shown only when the user owns the company. */
+ CompanyID company = (CompanyID)this->window_number;
+ int req_plane = (company != _local_company) ? STACKED_SELECTION_ZERO_SIZE : 0;
+ if (req_plane != this->GetWidget<NWidgetStacked>(CFW_SEL_BUTTONS)->shown_plane) {
this->SetupWidgets();
this->ReInit();
return;
}
- }
- /* Check that the loan buttons are shown only when the user owns the company. */
- CompanyID company = (CompanyID)this->window_number;
- int req_plane = (company != _local_company) ? STACKED_SELECTION_ZERO_SIZE : 0;
- if (req_plane != this->GetWidget<NWidgetStacked>(CFW_SEL_BUTTONS)->shown_plane) {
- this->SetupWidgets();
- this->ReInit();
- return;
+ const Company *c = Company::Get(company);
+ this->SetWidgetDisabledState(CFW_INCREASE_LOAN, c->current_loan == _economy.max_loan); // Borrow button only shows when there is any more money to loan.
+ this->SetWidgetDisabledState(CFW_REPAY_LOAN, company != _local_company || c->current_loan == 0); // Repay button only shows when there is any more money to repay.
}
- const Company *c = Company::Get(company);
- this->SetWidgetDisabledState(CFW_INCREASE_LOAN, c->current_loan == _economy.max_loan); // Borrow button only shows when there is any more money to loan.
- this->SetWidgetDisabledState(CFW_REPAY_LOAN, company != _local_company || c->current_loan == 0); // Repay button only shows when there is any more money to repay.
-
this->DrawWidgets();
}
@@ -1590,6 +1593,7 @@ static const NWidgetPart _nested_company_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, CW_WIDGET_CAPTION), SetDataTip(STR_COMPANY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
@@ -1713,44 +1717,46 @@ struct CompanyWindow : Window
const Company *c = Company::Get((CompanyID)this->window_number);
bool local = this->window_number == _local_company;
- /* Button bar selection. */
- int plane = local ? CWP_BUTTONS_LOCAL : CWP_BUTTONS_OTHER;
- NWidgetStacked *wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_BUTTONS);
- if (plane != wi->shown_plane) {
- wi->SetDisplayedPlane(plane);
- this->SetDirty();
- return;
- }
+ if (!this->IsShaded()) {
+ /* Button bar selection. */
+ int plane = local ? CWP_BUTTONS_LOCAL : CWP_BUTTONS_OTHER;
+ NWidgetStacked *wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_BUTTONS);
+ if (plane != wi->shown_plane) {
+ wi->SetDisplayedPlane(plane);
+ this->SetDirty();
+ return;
+ }
- /* Build HQ button handling. */
- plane = (local && c->location_of_HQ == INVALID_TILE) ? CWP_VB_BUILD : CWP_VB_VIEW;
- wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_VIEW_BUILD_HQ);
- if (plane != wi->shown_plane) {
- wi->SetDisplayedPlane(plane);
- this->SetDirty();
- return;
- }
+ /* Build HQ button handling. */
+ plane = (local && c->location_of_HQ == INVALID_TILE) ? CWP_VB_BUILD : CWP_VB_VIEW;
+ wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_VIEW_BUILD_HQ);
+ if (plane != wi->shown_plane) {
+ wi->SetDisplayedPlane(plane);
+ this->SetDirty();
+ return;
+ }
- this->SetWidgetDisabledState(CW_WIDGET_VIEW_HQ, c->location_of_HQ == INVALID_TILE);
+ this->SetWidgetDisabledState(CW_WIDGET_VIEW_HQ, c->location_of_HQ == INVALID_TILE);
- /* Enable/disable 'Relocate HQ' button. */
- plane = (!local || c->location_of_HQ == INVALID_TILE) ? CWP_RELOCATE_HIDE : CWP_RELOCATE_SHOW;
- wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_RELOCATE);
- if (plane != wi->shown_plane) {
- wi->SetDisplayedPlane(plane);
- this->SetDirty();
- return;
- }
+ /* Enable/disable 'Relocate HQ' button. */
+ plane = (!local || c->location_of_HQ == INVALID_TILE) ? CWP_RELOCATE_HIDE : CWP_RELOCATE_SHOW;
+ wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_RELOCATE);
+ if (plane != wi->shown_plane) {
+ wi->SetDisplayedPlane(plane);
+ this->SetDirty();
+ return;
+ }
- /* Multiplayer buttons. */
- plane = ((!_networking) ? CWP_MP_EMPTY : (local ? CWP_MP_C_PWD : CWP_MP_C_JOIN));
- wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_MULTIPLAYER);
- if (plane != wi->shown_plane) {
- wi->SetDisplayedPlane(plane);
- this->SetDirty();
- return;
+ /* Multiplayer buttons. */
+ plane = ((!_networking) ? CWP_MP_EMPTY : (local ? CWP_MP_C_PWD : CWP_MP_C_JOIN));
+ wi = this->GetWidget<NWidgetStacked>(CW_WIDGET_SELECT_MULTIPLAYER);
+ if (plane != wi->shown_plane) {
+ wi->SetDisplayedPlane(plane);
+ this->SetDirty();
+ return;
+ }
+ this->SetWidgetDisabledState(CW_WIDGET_COMPANY_JOIN, c->is_ai);
}
- this->SetWidgetDisabledState(CW_WIDGET_COMPANY_JOIN, c->is_ai);
if (!local) {
if (_settings_game.economy.allow_shares) { // Shares are allowed
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 171d437d3..9c918a4e1 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -62,6 +62,7 @@ static const NWidgetPart _nested_train_depot_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, DEPOT_WIDGET_CAPTION),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index e82964e8e..926cb7ea4 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -128,6 +128,7 @@ static const NWidgetPart _nested_graph_legend_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_KEY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, GLW_BACKGROUND),
@@ -599,6 +600,7 @@ static const NWidgetPart _nested_operating_profit_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 160), EndContainer(),
@@ -640,6 +642,7 @@ static const NWidgetPart _nested_income_graph_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 128), EndContainer(),
@@ -680,6 +683,7 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 128), EndContainer(),
@@ -733,6 +737,7 @@ static const NWidgetPart _nested_performance_history_widgets[] = {
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, PHW_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, PHW_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, PHW_BACKGROUND), SetMinimalSize(576, 224), EndContainer(),
@@ -772,6 +777,7 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, BGW_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, BGW_BACKGROUND), SetMinimalSize(576, 224), EndContainer(),
@@ -922,6 +928,7 @@ static const NWidgetPart _nested_cargo_payment_rates_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, CPW_BACKGROUND), SetMinimalSize(568, 128), SetResize(0, 1),
@@ -1124,6 +1131,7 @@ static const NWidgetPart _nested_company_league_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, CLW_BACKGROUND), SetMinimalSize(400, 0), SetMinimalTextLines(15, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM),
@@ -1460,6 +1468,7 @@ static const NWidgetPart _nested_performance_rating_detail_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_PERFORMANCE_DETAIL, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 657a1e39e..318a2972e 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -87,6 +87,7 @@ static const NWidgetPart _nested_group_widgets[] = {
NWidget(NWID_HORIZONTAL), // Window header
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, GRP_WIDGET_CAPTION),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 73a6aa7f1..2c0e98b1f 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -107,6 +107,7 @@ static const NWidgetPart _nested_build_industry_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_FUND_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -586,6 +587,8 @@ public:
{
this->DrawWidgets();
+ if (this->IsShaded()) return; // Don't draw anything when the window is shaded.
+
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(IVW_INFO);
uint expected = this->DrawInfo(nwi->pos_x, nwi->pos_x + nwi->current_x - 1, nwi->pos_y) - nwi->pos_y;
if (expected > nwi->current_y - 1) {
@@ -794,6 +797,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_CREAM),
NWidget(WWT_CAPTION, COLOUR_CREAM, IVW_CAPTION), SetDataTip(STR_INDUSTRY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_CREAM),
NWidget(WWT_STICKYBOX, COLOUR_CREAM),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_CREAM),
@@ -836,6 +840,7 @@ static const NWidgetPart _nested_industry_directory_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INDUSTRY_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 8362de96d..b8e02fea0 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -1016,6 +1016,7 @@ static const NWidgetPart _nested_message_history[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_MESSAGE_HISTORY, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 8a1068c46..62a2113b6 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1312,6 +1312,7 @@ static const NWidgetPart _nested_orders_train_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -1375,6 +1376,7 @@ static const NWidgetPart _nested_orders_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -1435,19 +1437,18 @@ static const WindowDesc _orders_desc(
/** Nested widget definition for competitor orders. */
static const NWidgetPart _nested_other_orders_widgets[] = {
- NWidget(NWID_VERTICAL),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP),
- NWidget(WWT_STICKYBOX, COLOUR_GREY),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PANEL, COLOUR_GREY, ORDER_WIDGET_ORDER_LIST), SetMinimalSize(372, 72), SetDataTip(0x0, STR_ORDERS_LIST_TOOLTIP), SetResize(1, 1), EndContainer(),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_SCROLLBAR, COLOUR_GREY, ORDER_WIDGET_SCROLLBAR),
- NWidget(WWT_RESIZEBOX, COLOUR_GREY),
- EndContainer(),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_CLOSEBOX, COLOUR_GREY),
+ NWidget(WWT_CAPTION, COLOUR_GREY, ORDER_WIDGET_CAPTION), SetDataTip(STR_ORDERS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, ORDER_WIDGET_TIMETABLE_VIEW), SetMinimalSize(61, 14), SetDataTip(STR_ORDERS_TIMETABLE_VIEW, STR_ORDERS_TIMETABLE_VIEW_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
+ NWidget(WWT_STICKYBOX, COLOUR_GREY),
+ EndContainer(),
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_PANEL, COLOUR_GREY, ORDER_WIDGET_ORDER_LIST), SetMinimalSize(372, 72), SetDataTip(0x0, STR_ORDERS_LIST_TOOLTIP), SetResize(1, 1), EndContainer(),
+ NWidget(NWID_VERTICAL),
+ NWidget(WWT_SCROLLBAR, COLOUR_GREY, ORDER_WIDGET_SCROLLBAR),
+ NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
EndContainer(),
};
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index 67dab304d..b66eb5d0a 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -200,6 +200,7 @@ static const NWidgetPart _nested_sign_list_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, SLW_CAPTION), SetDataTip(STR_SIGN_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -323,7 +324,7 @@ struct SignWindow : QueryStringBaseWindow, SignList {
virtual void OnPaint()
{
this->DrawWidgets();
- this->DrawEditBox(QUERY_EDIT_SIGN_WIDGET_TEXT);
+ if (!this->IsShaded()) this->DrawEditBox(QUERY_EDIT_SIGN_WIDGET_TEXT);
}
virtual void OnClick(Point pt, int widget)
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 4f50a1007..529c2f717 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -1250,6 +1250,7 @@ static const NWidgetPart _nested_smallmap_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, SM_WIDGET_CAPTION), SetDataTip(STR_SMALLMAP_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidgetFunction(SmallMapDisplay), // Smallmap display and legend bar + image buttons.
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 875689f4f..fc56919da 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -676,6 +676,7 @@ static const NWidgetPart _nested_company_stations_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, SLW_CAPTION), SetDataTip(STR_STATION_LIST_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -728,6 +729,7 @@ static const NWidgetPart _nested_station_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, SVW_CAPTION), SetDataTip(STR_STATION_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -855,9 +857,11 @@ struct StationViewWindow : public Window {
this->DrawWidgets();
- NWidgetBase *nwi = this->GetWidget<NWidgetBase>(SVW_WAITING);
- Rect waiting_rect = {nwi->pos_x, nwi->pos_y, nwi->pos_x + nwi->current_x - 1, nwi->pos_y + nwi->current_y - 1};
- this->DrawWaitingCargo(waiting_rect, cargolist, transfers);
+ if (!this->IsShaded()) {
+ NWidgetBase *nwi = this->GetWidget<NWidgetBase>(SVW_WAITING);
+ Rect waiting_rect = {nwi->pos_x, nwi->pos_y, nwi->pos_x + nwi->current_x - 1, nwi->pos_y + nwi->current_y - 1};
+ this->DrawWaitingCargo(waiting_rect, cargolist, transfers);
+ }
}
virtual void DrawWidget(const Rect &r, int widget) const
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index 8f63615f9..cba1f992e 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -230,6 +230,7 @@ static const NWidgetPart _nested_subsidies_list_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_SUBSIDIES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 57469a917..c13a94872 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -516,6 +516,7 @@ static const NWidgetPart _nested_scen_edit_land_gen_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp
index df9f28574..0af26e8b8 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -603,6 +603,7 @@ static const NWidgetPart _nested_timetable_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, TTV_CAPTION), SetDataTip(STR_TIMETABLE_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, TTV_ORDER_VIEW), SetMinimalSize(61, 14), SetDataTip( STR_TIMETABLE_ORDER_VIEW, STR_TIMETABLE_ORDER_VIEW_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index e4cb0ab7a..ca4ff3154 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -53,6 +53,7 @@ static const NWidgetPart _nested_town_authority_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, TWA_CAPTION), SetDataTip(STR_LOCAL_AUTHORITY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN, TWA_RATING_INFO), SetMinimalSize(317, 92), SetResize(1, 1), EndContainer(),
@@ -116,7 +117,7 @@ public:
this->SetWidgetDisabledState(TWA_EXECUTE, this->sel_index == -1);
this->DrawWidgets();
- this->DrawRatings();
+ if (!this->IsShaded()) this->DrawRatings();
}
/** Draw the contents of the ratings panel. May request a resize of the window if the contents does not fit. */
@@ -534,6 +535,7 @@ static const NWidgetPart _nested_town_game_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, TVW_CAPTION), SetDataTip(STR_TOWN_VIEW_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN),
@@ -564,6 +566,7 @@ static const NWidgetPart _nested_town_editor_view_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, TVW_CAPTION), SetDataTip(STR_TOWN_VIEW_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_BROWN, TVW_CHANGENAME), SetMinimalSize(76, 14), SetDataTip(STR_BUTTON_RENAME, STR_TOWN_VIEW_RENAME_TOOLTIP),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_BROWN),
@@ -612,6 +615,7 @@ static const NWidgetPart _nested_town_directory_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_TOWN_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_BROWN),
NWidget(WWT_STICKYBOX, COLOUR_BROWN),
EndContainer(),
NWidget(NWID_HORIZONTAL),
@@ -921,6 +925,7 @@ static const NWidgetPart _nested_found_town_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_FOUND_TOWN_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
/* Construct new town(s) buttons. */
@@ -1067,7 +1072,7 @@ public:
virtual void OnPaint()
{
this->DrawWidgets();
- this->DrawEditBox(TSEW_TOWNNAME_EDITBOX);
+ if (!this->IsShaded()) this->DrawEditBox(TSEW_TOWNNAME_EDITBOX);
}
virtual void OnClick(Point pt, int widget)
diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp
index f8b49de4e..bfd2f89db 100644
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -166,6 +166,7 @@ static const NWidgetPart _nested_build_trees_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_PLANT_TREE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 0e40b94e8..4478f330d 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -791,6 +791,7 @@ static const NWidgetPart _nested_vehicle_list[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, VLW_WIDGET_CAPTION),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
@@ -1351,6 +1352,7 @@ static const NWidgetPart _nested_nontrain_vehicle_details_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, VLD_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VLD_WIDGET_RENAME_VEHICLE), SetMinimalSize(40, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_VEHICLE_NAME_BUTTON, STR_NULL /* filled in later */),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, VLD_WIDGET_TOP_DETAILS), SetMinimalSize(405, 42), SetResize(1, 0), EndContainer(),
@@ -1371,6 +1373,7 @@ static const NWidgetPart _nested_train_vehicle_details_widgets[] = {
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, VLD_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_DETAILS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, VLD_WIDGET_RENAME_VEHICLE), SetMinimalSize(40, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_VEHICLE_NAME_BUTTON, STR_NULL /* filled in later */),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, VLD_WIDGET_TOP_DETAILS), SetResize(1, 0), SetMinimalSize(405, 42), EndContainer(),
@@ -1720,6 +1723,7 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, VVW_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(NWID_HORIZONTAL),
diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp
index 0a84b2880..e910f00bc 100644
--- a/src/viewport_gui.cpp
+++ b/src/viewport_gui.cpp
@@ -36,6 +36,7 @@ static const NWidgetPart _nested_extra_view_port_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, EVW_CAPTION), SetDataTip(STR_EXTRA_VIEW_PORT_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index 9861e40f3..b48c3a9fb 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -131,6 +131,7 @@ static const NWidgetPart _nested_waypoint_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WAYPVW_CAPTION), SetDataTip(STR_WAYPOINT_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
+ NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),