summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
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 /src/station_gui.cpp
parentf55c3312b3a343362548234a7bcf712ec7f15285 (diff)
downloadopenttd-91872aca4836c4e07808548b5a6d370a06734d58.tar.xz
(svn r18588) -Feature [FS#2943]: Add shading and unshading of windows.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp10
1 files changed, 7 insertions, 3 deletions
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