Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-03-30 13:37:10 +0000
committerStijn Buys <ingar@osirion.org>2011-03-30 13:37:10 +0000
commit8bba03b41a5853a0fd8b9003ada577354e1d10ec (patch)
tree161aa65dccad9780c420a533a79eb6434818b20b /src/client/inventorylistview.cc
parent61a69153eec93f50acdc322a5f52406ac79fcb85 (diff)
Grayed out trade items that are currently not available from a trader.
Diffstat (limited to 'src/client/inventorylistview.cc')
-rw-r--r--src/client/inventorylistview.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/inventorylistview.cc b/src/client/inventorylistview.cc
index e41aea2..8ec2c82 100644
--- a/src/client/inventorylistview.cc
+++ b/src/client/inventorylistview.cc
@@ -60,9 +60,13 @@ void InventoryListView::set_inventory(core::Inventory *inventory, core::InfoType
std::string sortkey;
std::ostringstream str;
+
+ if (item->amount() == 0) {
+ str << "^N";
+ }
str << item->info()->name().c_str();
- if (item->amount() >= 0) {
+ if (item->amount() > 0) {
str << " (" << item->amount() << ")";
}
@@ -79,6 +83,10 @@ void InventoryListView::set_inventory(core::Inventory *inventory, core::InfoType
listitem->set_item(item);
listitem->set_info(item->info());
listitem->set_sortkey(sortkey);
+
+ //if (item->amount() == 0) {
+ // listitem->disable();
+ //}
// preserve previous selection during update
if (item == selecteditem) {
ui::ListView::select(listitem);