diff options
author | alberth <alberth@openttd.org> | 2009-07-09 20:23:13 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-07-09 20:23:13 +0000 |
commit | bc32b7dc4c81be250905be633b4b3c1d126c590a (patch) | |
tree | 25236836b361fb8d643ff262f39e65d480618220 | |
parent | 1d8e4a48b493b62d176315300d2e72b9f9ce5249 (diff) | |
download | openttd-bc32b7dc4c81be250905be633b4b3c1d126c590a.tar.xz |
(svn r16780) -Add [FS#3015]: Allow the AI Debug Window to become sticky.
-rw-r--r-- | src/ai/ai_gui.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 33585059e..acfb93e4f 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -619,6 +619,7 @@ void ShowAIConfigWindow() enum AIDebugWindowWidgets { AID_WIDGET_CLOSEBOX = 0, AID_WIDGET_CAPTION, + AID_WIDGET_STICKY, AID_WIDGET_VIEW, AID_WIDGET_NAME_TEXT, AID_WIDGET_RELOAD_TOGGLE, @@ -832,7 +833,8 @@ CompanyID AIDebugWindow::ai_debug_company = INVALID_COMPANY; static const Widget _ai_debug_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_BLACK_CROSS, STR_TOOLTIP_CLOSE_WINDOW}, // AID_WIDGET_CLOSEBOX -{ WWT_CAPTION, RESIZE_RIGHT, COLOUR_GREY, 11, 298, 0, 13, STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS}, // AID_WIDGET_CAPTION +{ WWT_CAPTION, RESIZE_RIGHT, COLOUR_GREY, 11, 286, 0, 13, STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS}, // AID_WIDGET_CAPTION +{ WWT_STICKYBOX, RESIZE_LR, COLOUR_GREY, 287, 298, 0, 13, 0x0, STR_STICKY_BUTTON }, // AID_WIDGET_STICKY { WWT_PANEL, RESIZE_RIGHT, COLOUR_GREY, 0, 298, 14, 40, 0x0, STR_NULL}, // AID_WIDGET_VIEW { WWT_PANEL, RESIZE_RIGHT, COLOUR_GREY, 0, 149, 41, 60, 0x0, STR_AI_DEBUG_NAME_TIP}, // AID_WIDGET_NAME_TEXT @@ -862,7 +864,8 @@ static const Widget _ai_debug_widgets[] = { static const NWidgetPart _nested_ai_debug_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_GREY, AID_WIDGET_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_GREY, AID_WIDGET_CAPTION), SetMinimalSize(288, 14), SetResize(1, 0), SetDataTip(STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_CAPTION, COLOUR_GREY, AID_WIDGET_CAPTION), SetResize(1, 0), SetDataTip(STR_AI_DEBUG, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_STICKYBOX, COLOUR_GREY, AID_WIDGET_STICKY), EndContainer(), NWidget(WWT_PANEL, COLOUR_GREY, AID_WIDGET_VIEW), NWidget(NWID_HORIZONTAL), @@ -923,7 +926,7 @@ static const NWidgetPart _nested_ai_debug_widgets[] = { 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, + WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE, _ai_debug_widgets, _nested_ai_debug_widgets, lengthof(_nested_ai_debug_widgets) ); |