Base window for showing the download status of content. More...
#include <network_content_gui.h>
Public Member Functions | |
| BaseNetworkContentDownloadStatusWindow (const WindowDesc *desc) | |
| Create the window with the given description. | |
| ~BaseNetworkContentDownloadStatusWindow () | |
| Free everything associated with this window. | |
| virtual void | DrawWidget (const Rect &r, int widget) const |
| virtual void | OnDownloadProgress (const ContentInfo *ci, int bytes) |
| We have progress in the download of a file. | |
Protected Attributes | |
| uint | total_bytes |
| Number of bytes to download. | |
| uint | downloaded_bytes |
| Number of bytes downloaded. | |
| uint | total_files |
| Number of files to download. | |
| uint | downloaded_files |
| Number of files downloaded. | |
| uint32 | cur_id |
| The current ID of the downloaded file. | |
| char | name [48] |
| The current name of the downloaded file. | |
Base window for showing the download status of content.
Definition at line 20 of file network_content_gui.h.
| BaseNetworkContentDownloadStatusWindow::BaseNetworkContentDownloadStatusWindow | ( | const WindowDesc * | desc | ) |
Create the window with the given description.
| desc | The description of the window. |
Definition at line 52 of file network_content_gui.cpp.
References _network_content_client, ClientNetworkContentSocketHandler::AddCallback(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), Window::InitNested(), total_bytes, total_files, and WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD.
| void BaseNetworkContentDownloadStatusWindow::OnDownloadProgress | ( | const ContentInfo * | ci, | |
| int | bytes | |||
| ) | [virtual] |
We have progress in the download of a file.
| ci | the content info of the file | |
| bytes | the number of bytes downloaded since the previous call |
Reimplemented from ContentCallback.
Reimplemented in NetworkContentDownloadStatusWindow.
Definition at line 95 of file network_content_gui.cpp.
References cur_id, downloaded_bytes, downloaded_files, ContentInfo::filename, ContentInfo::id, lastof, name, Window::SetDirty(), and strecpy().
1.7.1