diff options
author | alberth <alberth@openttd.org> | 2009-05-05 20:03:57 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-05-05 20:03:57 +0000 |
commit | fb1dbd6d192cfc532a6e82e86edc32cbb956f4c5 (patch) | |
tree | 2ac92ad7899eec1975268285060b8ce224393444 | |
parent | e04d2c88d93be047c0dbd488ce7d4998e8f6d8aa (diff) | |
download | openttd-fb1dbd6d192cfc532a6e82e86edc32cbb956f4c5.tar.xz |
(svn r16231) -Codechange: Added nested widgets to chat window.
-rw-r--r-- | src/network/network_chat_gui.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 9e0e92cb0..09459c5de 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -501,11 +501,33 @@ static const Widget _chat_window_widgets[] = { { WIDGETS_END}, }; +static const NWidgetPart _nested_chat_window_widgets[] = { + NWidget(NWID_HORIZONTAL), + NWidget(WWT_CLOSEBOX, COLOUR_GREY, NWCW_CLOSE), + NWidget(WWT_PANEL, COLOUR_GREY, NWCW_BACKGROUND), + NWidget(NWID_HORIZONTAL), + NWidget(WWT_EDITBOX, COLOUR_GREY, NWCW_TEXTBOX), SetMinimalSize(183, 12), SetPadding(1, 0, 1, 64), SetResize(1, 0), + SetDataTip(STR_NETWORK_CHAT_OSKTITLE, STR_NULL), + NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, NWCW_SENDBUTTON), SetMinimalSize(62, 12), SetPadding(1, 0, 1, 0), SetDataTip(STR_NETWORK_SEND, STR_NULL), + EndContainer(), + EndContainer(), + EndContainer(), +}; + +void test_chat() +{ + const Widget *wid; + + printf("_chat_window_widgets\n"); + wid = InitializeWidgetArrayFromNestedWidgets(_nested_chat_window_widgets, lengthof(_nested_chat_window_widgets), _chat_window_widgets, NULL); + free((void *)wid); +} + static const WindowDesc _chat_window_desc( WDP_CENTER, -26, 320, 14, 640, 14, // x, y, width, height WC_SEND_NETWORK_MSG, WC_NONE, WDF_STD_TOOLTIPS | WDF_DEF_WIDGET, - _chat_window_widgets + _chat_window_widgets, _nested_chat_window_widgets, lengthof(_nested_chat_window_widgets) ); void ShowNetworkChatQueryWindow(DestType type, int dest) |