(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 40ab9eeeba
commit 0e9dac92d2
22 changed files with 123 additions and 70 deletions

View File

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