Window for showing the download status of content. More...
Public Member Functions | |
| NetworkContentDownloadStatusWindow () | |
| Create a new download window based on a list of content information with flags whether to download them or not. | |
| ~NetworkContentDownloadStatusWindow () | |
| Free whatever we've allocated. | |
| virtual void | DrawWidget (const Rect &r, int widget) const |
| virtual void | OnClick (Point pt, int widget, int click_count) |
| virtual void | OnDownloadProgress (const ContentInfo *ci, int bytes) |
| We have progress in the download of a file. | |
Private Attributes | |
| 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. | |
| uint32 | cur_id |
| The current ID of the downloaded file. | |
| char | name [48] |
| The current name of the downloaded file. | |
Window for showing the download status of content.
Definition at line 57 of file network_content_gui.cpp.
| NetworkContentDownloadStatusWindow::NetworkContentDownloadStatusWindow | ( | ) | [inline] |
Create a new download window based on a list of content information with flags whether to download them or not.
| infos | the list to search in |
Definition at line 76 of file network_content_gui.cpp.
References _network_content_download_status_window_desc, ClientNetworkContentSocketHandler::AddCallback(), FindWindowById(), Window::InitNested(), Window::parent, total_bytes, and total_files.
| virtual void NetworkContentDownloadStatusWindow::OnDownloadProgress | ( | const ContentInfo * | ci, | |
| int | bytes | |||
| ) | [inline, 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.
Definition at line 178 of file network_content_gui.cpp.
References cur_id, downloaded_bytes, downloaded_files, ContentInfo::filename, ContentInfo::id, SmallVector< T, S >::Include(), lastof, name, receivedTypes, Window::SetDirty(), strecpy(), total_bytes, and ContentInfo::type.
1.7.1