diff options
author | rubidium <rubidium@openttd.org> | 2009-01-18 15:53:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-18 15:53:21 +0000 |
commit | 730ceecb8bae9df247386a49f92eb1d847b36923 (patch) | |
tree | 7348a0686d1b7e015c0b24dac182457a270b3c54 /src/network | |
parent | 1bc8e3f536276bf37a246f1e747cb7563c7e20dc (diff) | |
download | openttd-730ceecb8bae9df247386a49f92eb1d847b36923.tar.xz |
(svn r15136) -Fix (r15126): (file) name could occasionally be wider than the download window causing glitches.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_content_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 44e191c90..1de6faaf4 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -53,7 +53,7 @@ private: uint downloaded_bytes; ///< Number of bytes downloaded uint32 cur_id; ///< The current ID of the downloaded file - char name[32]; ///< The current name of the downloaded file + char name[48]; ///< The current name of the downloaded file public: /** @@ -142,14 +142,14 @@ public: DrawStringCentered(this->width / 2, 35, STR_CONTENT_DOWNLOAD_PROGRESS_SIZE, TC_GREY); if (this->downloaded_bytes == this->total_bytes) { - DrawStringCentered(this->width / 2, 46, STR_CONTENT_DOWNLOAD_COMPLETE, TC_GREY); + DrawStringCentered(this->width / 2, 50, STR_CONTENT_DOWNLOAD_COMPLETE, TC_GREY); } else if (!StrEmpty(this->name)) { SetDParamStr(0, this->name); SetDParam(1, this->downloaded_files); SetDParam(2, this->total_files); - DrawStringCentered(this->width / 2, 46, STR_CONTENT_DOWNLOAD_FILE, TC_GREY); + DrawStringMultiCenter(this->width / 2, 50, STR_CONTENT_DOWNLOAD_FILE, this->width); } else { - DrawStringCentered(this->width / 2, 46, STR_CONTENT_DOWNLOAD_INITIALISE, TC_GREY); + DrawStringCentered(this->width / 2, 50, STR_CONTENT_DOWNLOAD_INITIALISE, TC_GREY); } } |