|
@@ -41,25 +41,25 @@ static const NWidgetPart _nested_network
|
|
|
NWidget(WWT_PUSHTXTBTN, COLOUR_WHITE, NCDSWW_CANCELOK), SetMinimalSize(101, 12), SetDataTip(STR_BUTTON_CANCEL, STR_NULL),
|
|
|
NWidget(NWID_SPACER), SetFill(true, false),
|
|
|
EndContainer(),
|
|
|
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
|
|
|
EndContainer(),
|
|
|
};
|
|
|
|
|
|
/** Window description for the download window */
|
|
|
static const WindowDesc _network_content_download_status_window_desc(
|
|
|
WDP_CENTER, WDP_CENTER, 350, 85, 350, 85,
|
|
|
WC_NETWORK_STATUS_WINDOW, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_MODAL,
|
|
|
NULL, _nested_network_content_download_status_window_widgets, lengthof(_nested_network_content_download_status_window_widgets)
|
|
|
_nested_network_content_download_status_window_widgets, lengthof(_nested_network_content_download_status_window_widgets)
|
|
|
);
|
|
|
|
|
|
/** Window for showing the download status of content */
|
|
|
struct NetworkContentDownloadStatusWindow : public Window, ContentCallback {
|
|
|
private:
|
|
|
ClientNetworkContentSocketHandler *connection; ///< Our connection with the content server
|
|
|
SmallVector<ContentType, 4> receivedTypes; ///< Types we received so we can update their cache
|
|
|
|
|
|
uint total_files; ///< Number of files to download
|
|
|
uint downloaded_files; ///< Number of files downloaded
|
|
|
uint total_bytes; ///< Number of bytes to download
|
|
|
uint downloaded_bytes; ///< Number of bytes downloaded
|
|
@@ -865,25 +865,25 @@ static const NWidgetPart _nested_network
|
|
|
NWidget(NWID_HORIZONTAL),
|
|
|
NWidget(NWID_SPACER), SetFill(true, false), SetResize(1, 0),
|
|
|
NWidget(WWT_RESIZEBOX, COLOUR_LIGHT_BLUE, NCLWW_RESIZE),
|
|
|
EndContainer(),
|
|
|
EndContainer(),
|
|
|
};
|
|
|
|
|
|
/** Window description of the content list */
|
|
|
static const WindowDesc _network_content_list_desc(
|
|
|
WDP_CENTER, WDP_CENTER, 450, 278, 630, 460,
|
|
|
WC_NETWORK_WINDOW, WC_NONE,
|
|
|
WDF_STD_TOOLTIPS | WDF_DEF_WIDGET | WDF_STD_BTN | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
|
|
|
NULL, _nested_network_content_list_widgets, lengthof(_nested_network_content_list_widgets)
|
|
|
_nested_network_content_list_widgets, lengthof(_nested_network_content_list_widgets)
|
|
|
);
|
|
|
|
|
|
/**
|
|
|
* Show the content list window with a given set of content
|
|
|
* @param cv the content to show, or NULL when it has to search for itself
|
|
|
* @param type the type to (only) show
|
|
|
*/
|
|
|
void ShowNetworkContentListWindow(ContentVector *cv, ContentType type)
|
|
|
{
|
|
|
#if defined(WITH_ZLIB)
|
|
|
_network_content_client.Clear();
|
|
|
if (cv == NULL) {
|