00001 /* $Id: network_content_gui.h 23528 2011-12-15 22:22:55Z truebrain $ */ 00002 00003 /* 00004 * This file is part of OpenTTD. 00005 * 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. 00006 * 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. 00007 * 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/>. 00008 */ 00009 00012 #ifndef NETWORK_CONTENT_GUI_H 00013 #define NETWORK_CONTENT_GUI_H 00014 00015 #include "network_content.h" 00016 #include "../window_gui.h" 00017 #include "../widgets/network_content_widget.h" 00018 00020 class BaseNetworkContentDownloadStatusWindow : public Window, ContentCallback { 00021 protected: 00022 uint total_bytes; 00023 uint downloaded_bytes; 00024 uint total_files; 00025 uint downloaded_files; 00026 00027 uint32 cur_id; 00028 char name[48]; 00029 00030 public: 00035 BaseNetworkContentDownloadStatusWindow(const WindowDesc *desc); 00036 00040 ~BaseNetworkContentDownloadStatusWindow(); 00041 00042 virtual void DrawWidget(const Rect &r, int widget) const; 00043 virtual void OnDownloadProgress(const ContentInfo *ci, int bytes); 00044 }; 00045 00046 #endif /* NETWORK_CONTENT_GUI_H */