diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/inventorywindow.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/inventorywindow.cc b/src/client/inventorywindow.cc index 9539061..1483325 100644 --- a/src/client/inventorywindow.cc +++ b/src/client/inventorywindow.cc @@ -7,6 +7,7 @@ #include "core/application.h" #include "client/inventorywindow.h" #include "ui/label.h" +#include "ui/bitmap.h" #include "ui/listitem.h" #include "ui/paint.h" #include "ui/ui.h" @@ -135,6 +136,17 @@ void InventoryWindow::update_inventory() sortkey += item->info()->label(); listitem->set_sortkey(sortkey); + // mount indicator + if (item->has_flag(core::Item::Mounted)) { + const float icon_size = 24.0f; // small icons + const float padding = ui::root()->font_large()->height(); + + ui::Bitmap *icon = new ui::Bitmap(listitem, "bitmaps/icons/button_unmount"); + icon->set_background(true); + icon->set_size(icon_size, icon_size); + icon->set_location(ui::UI::elementsize.width() - icon_size - padding, padding); + } + // preserve previous selection during update if (item == selecteditem) { inventorywindow_listview->select(listitem); |