diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/inventorywindow.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/inventorywindow.cc b/src/client/inventorywindow.cc index 1483325..0d91b4d 100644 --- a/src/client/inventorywindow.cc +++ b/src/client/inventorywindow.cc @@ -141,10 +141,13 @@ void InventoryWindow::update_inventory() 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); + ui::IconButton *unmount_button = new ui::IconButton(listitem, "bitmaps/icons/button_unmount"); + std::ostringstream strcmd; + strcmd << "remote mount " << item->id(); + unmount_button->set_command(strcmd.str()); + unmount_button->set_background(true); + unmount_button->set_size(icon_size, icon_size); + unmount_button->set_location(ui::UI::elementsize.width() - icon_size - padding, padding); } // preserve previous selection during update |