From 0e02c4a6abc15d6cc0eb8eb690025cebb93410a7 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 28 Jun 2007 18:05:48 +0000 Subject: Push item weights to the right of the inventory menu. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1683 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/invent.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/invent.cc') diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 8619660b83..a416f411c4 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -21,6 +21,7 @@ #include #include #include +#include #ifdef DOS #include @@ -129,7 +130,9 @@ std::string InvEntry::get_text() const if ( Options.show_inventory_weights ) { const int mass = item_mass(*item); - tstr << " [" << (mass/10) << '.' << (mass%10) << " aum]"; + tstr << std::setw(get_number_of_cols() - tstr.str().length() - 1) + << std::right + << make_stringf("(%d.%d aum)", mass / 10, mass % 10); } return tstr.str(); } -- cgit v1.2.3-54-g00ecf