diff options
author | alberth <alberth@openttd.org> | 2009-03-28 13:35:07 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-03-28 13:35:07 +0000 |
commit | 3bebfc6fd35e51454182b12e4e63b01b55ddce9d (patch) | |
tree | 23adb810b61b41623082fc55809f7eaa57ddcf91 | |
parent | f30f5607e33e47ca9a9fca1250a13c02d7bdb931 (diff) | |
download | openttd-3bebfc6fd35e51454182b12e4e63b01b55ddce9d.tar.xz |
(svn r15878) -Codechange: New widgets for the engine preview window.
-rw-r--r-- | src/engine_gui.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 9cc77a435..1d02b6ba6 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -48,6 +48,21 @@ static const Widget _engine_preview_widgets[] = { { WIDGETS_END}, }; +static const NWidgetPart _nested_engine_preview_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, EPW_CLOSE), + NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, EPW_CAPTION), SetDataTip(STR_8100_MESSAGE_FROM_VEHICLE_MANUFACTURE, STR_018C_WINDOW_TITLE_DRAG_THIS), + EndContainer(), + NWidget(WWT_PANEL, COLOUR_LIGHT_BLUE, EPW_BACKGROUND), + NWidget(NWID_SPACER), SetMinimalSize(0, 158), + NWidget(NWID_HORIZONTAL), SetPIP(85, 10, 85), + NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, EPW_NO), SetMinimalSize(60, 12), SetDataTip(STR_00C9_NO, STR_NULL), + NWidget(WWT_PUSHTXTBTN, COLOUR_LIGHT_BLUE, EPW_YES), SetMinimalSize(60, 12), SetDataTip(STR_00C8_YES, STR_NULL), + EndContainer(), + NWidget(NWID_SPACER), SetMinimalSize(0, 8), + EndContainer(), +}; + typedef void DrawEngineProc(int x, int y, EngineID engine, SpriteID pal); typedef void DrawEngineInfoProc(EngineID, int left, int right, int top, int bottom); @@ -109,7 +124,7 @@ static const WindowDesc _engine_preview_desc( WDP_CENTER, WDP_CENTER, 300, 192, 300, 192, WC_ENGINE_PREVIEW, WC_NONE, WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_CONSTRUCTION, - _engine_preview_widgets + _engine_preview_widgets, _nested_engine_preview_widgets, lengthof(_nested_engine_preview_widgets) ); |