diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/inventorylistview.cc | 10 |
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); |