(svn r18588) -Feature [FS#2943]: Add shading and unshading of windows.

This commit is contained in:
alberth
2009-12-21 16:24:29 +00:00
parent f55c3312b3
commit 91872aca48
22 changed files with 123 additions and 70 deletions

View File

@@ -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