Fix #8316: Make sort industries by production and transported with a cargo filter...
[openttd-github.git] / src / network / network_content_gui.h
blob54fbcc36b35e37fcb96016a2678f07d55186cbc1
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file network_content_gui.h User interface for downloading files. */
10 #ifndef NETWORK_CONTENT_GUI_H
11 #define NETWORK_CONTENT_GUI_H
13 #include "network_content.h"
14 #include "../window_gui.h"
15 #include "../widgets/network_content_widget.h"
17 /** Base window for showing the download status of content */
18 class BaseNetworkContentDownloadStatusWindow : public Window, ContentCallback {
19 protected:
20 uint total_bytes; ///< Number of bytes to download
21 uint downloaded_bytes; ///< Number of bytes downloaded
22 uint total_files; ///< Number of files to download
23 uint downloaded_files; ///< Number of files downloaded
25 uint32 cur_id; ///< The current ID of the downloaded file
26 std::string name; ///< The current name of the downloaded file
28 public:
29 /**
30 * Create the window with the given description.
31 * @param desc The description of the window.
33 BaseNetworkContentDownloadStatusWindow(WindowDesc *desc);
35 void Close() override;
36 void DrawWidget(const Rect &r, int widget) const override;
37 void OnDownloadProgress(const ContentInfo *ci, int bytes) override;
40 void BuildContentTypeStringList();
42 #endif /* NETWORK_CONTENT_GUI_H */