|
|
@ -19,6 +19,13 @@
|
|
|
|
#include "table/strings.h"
|
|
|
|
#include "table/strings.h"
|
|
|
|
#include "../table/sprites.h"
|
|
|
|
#include "../table/sprites.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Widgets used by this window */
|
|
|
|
|
|
|
|
enum DownloadStatusWindowWidgets {
|
|
|
|
|
|
|
|
NCDSWW_CAPTION, ///< Caption of the window
|
|
|
|
|
|
|
|
NCDSWW_BACKGROUND, ///< Background
|
|
|
|
|
|
|
|
NCDSWW_CANCELOK, ///< Cancel/OK button
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** Widgets for the download window */
|
|
|
|
/** Widgets for the download window */
|
|
|
|
static const Widget _network_content_download_status_window_widget[] = {
|
|
|
|
static const Widget _network_content_download_status_window_widget[] = {
|
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 0, 349, 0, 13, STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS}, // NCDSWW_CAPTION
|
|
|
|
{ WWT_CAPTION, RESIZE_NONE, COLOUR_GREY, 0, 349, 0, 13, STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS}, // NCDSWW_CAPTION
|
|
|
@ -37,13 +44,6 @@ static const WindowDesc _network_content_download_status_window_desc(
|
|
|
|
|
|
|
|
|
|
|
|
/** Window for showing the download status of content */
|
|
|
|
/** Window for showing the download status of content */
|
|
|
|
struct NetworkContentDownloadStatusWindow : public Window, ContentCallback {
|
|
|
|
struct NetworkContentDownloadStatusWindow : public Window, ContentCallback {
|
|
|
|
/** Widgets used by this window */
|
|
|
|
|
|
|
|
enum Widgets {
|
|
|
|
|
|
|
|
NCDSWW_CAPTION, ///< Caption of the window
|
|
|
|
|
|
|
|
NCDSWW_BACKGROUND, ///< Background
|
|
|
|
|
|
|
|
NCDSWW_CANCELOK, ///< Cancel/OK button
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
ClientNetworkContentSocketHandler *connection; ///< Our connection with the content server
|
|
|
|
ClientNetworkContentSocketHandler *connection; ///< Our connection with the content server
|
|
|
|
SmallVector<ContentType, 4> receivedTypes; ///< Types we received so we can update their cache
|
|
|
|
SmallVector<ContentType, 4> receivedTypes; ///< Types we received so we can update their cache
|
|
|
@ -164,12 +164,8 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** Window that lists the content that's at the content server */
|
|
|
|
/** Widgets of the content list window. */
|
|
|
|
class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback {
|
|
|
|
enum NetworkContentListWindowWidgets {
|
|
|
|
typedef GUIList<const ContentInfo*> GUIContentList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** All widgets used */
|
|
|
|
|
|
|
|
enum Widgets {
|
|
|
|
|
|
|
|
NCLWW_CLOSE, ///< Close 'X' button
|
|
|
|
NCLWW_CLOSE, ///< Close 'X' button
|
|
|
|
NCLWW_CAPTION, ///< Caption of the window
|
|
|
|
NCLWW_CAPTION, ///< Caption of the window
|
|
|
|
NCLWW_BACKGROUND, ///< Resize button
|
|
|
|
NCLWW_BACKGROUND, ///< Resize button
|
|
|
@ -194,6 +190,10 @@ class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback {
|
|
|
|
NCLWW_RESIZE, ///< Resize button
|
|
|
|
NCLWW_RESIZE, ///< Resize button
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Window that lists the content that's at the content server */
|
|
|
|
|
|
|
|
class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback {
|
|
|
|
|
|
|
|
typedef GUIList<const ContentInfo*> GUIContentList;
|
|
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
enum {
|
|
|
|
EDITBOX_MAX_SIZE = 50,
|
|
|
|
EDITBOX_MAX_SIZE = 50,
|
|
|
|
EDITBOX_MAX_LENGTH = 300,
|
|
|
|
EDITBOX_MAX_LENGTH = 300,
|
|
|
|