(svn r16231) -Codechange: Added nested widgets to chat window.
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user