diff options
author | Florian Diebold <flodiebold@gmail.com> | 2014-08-03 11:11:29 +0200 |
---|---|---|
committer | Florian Diebold <flodiebold@gmail.com> | 2014-08-03 11:13:24 +0200 |
commit | e4d24e4b79350681a664bed1b593e36f7900748c (patch) | |
tree | c47087e826f3e366729729a9999cf374cdf16bf0 /crawl-ref/source/stash.cc | |
parent | fd4ca0a4f9973ba7480005d44d8859030cd477f3 (diff) | |
download | crawl-ref-e4d24e4b79350681a664bed1b593e36f7900748c.tar.gz crawl-ref-e4d24e4b79350681a664bed1b593e36f7900748c.zip |
Fix Webtiles compilation.
Broken by cb4b6e1; the stash title is now unwrapped again in Webtiles.
Diffstat (limited to 'crawl-ref/source/stash.cc')
-rw-r--r-- | crawl-ref/source/stash.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc index 4a54aa7014..71be74da83 100644 --- a/crawl-ref/source/stash.cc +++ b/crawl-ref/source/stash.cc @@ -467,7 +467,7 @@ protected: int title_height() const; bool process_key(int key); private: - formatted_string create_title_string() const; + formatted_string create_title_string(bool wrap = true) const; }; void StashMenu::draw_title() @@ -478,7 +478,7 @@ void StashMenu::draw_title() create_title_string().display(); #ifdef USE_TILE_WEB - webtiles_set_title(fs); + webtiles_set_title(create_title_string(false)); #endif } } @@ -495,7 +495,7 @@ int StashMenu::title_height() const } } -formatted_string StashMenu::create_title_string() const +formatted_string StashMenu::create_title_string(bool wrap) const { formatted_string fs = formatted_string(title->colour); fs.cprintf("%s", title->text.c_str()); @@ -521,7 +521,8 @@ formatted_string StashMenu::create_title_string() const int term_width = get_number_of_cols(); int remaining = term_width - fs.width(); unsigned int extra_idx = 0; - while (static_cast<int>(extra_parts[extra_idx].length()) + 2 <= remaining) + while (static_cast<int>(extra_parts[extra_idx].length()) + 2 <= remaining + || !wrap) { fs.cprintf(" %s", extra_parts[extra_idx].c_str()); |