From 750fb61bd3cda4ffe775ab5e45ff6ff2ed5cb4ba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 24 Jan 2015 21:40:25 +0300 Subject: allow store and retreive buttons work with cart. --- src/gui/windows/itemamountwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/gui/windows/itemamountwindow.cpp') diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 19d18eef8..5b714774c 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -72,10 +72,18 @@ void ItemAmountWindow::finish(const Item *const item, inventoryHandler->moveItem2(InventoryType::INVENTORY, item->getInvIndex(), amount, InventoryType::STORAGE); break; + case CartAdd: + inventoryHandler->moveItem2(InventoryType::INVENTORY, + item->getInvIndex(), amount, InventoryType::CART); + break; case StoreRemove: inventoryHandler->moveItem2(InventoryType::STORAGE, item->getInvIndex(), amount, InventoryType::INVENTORY); break; + case CartRemove: + inventoryHandler->moveItem2(InventoryType::CART, + item->getInvIndex(), amount, InventoryType::INVENTORY); + break; case ShopBuyAdd: if (shopWindow) shopWindow->addBuyItem(item, amount, price); @@ -225,10 +233,18 @@ ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent, // TRANSLATORS: amount window message setCaption(_("Select amount of items to store.")); break; + case CartAdd: + // TRANSLATORS: amount window message + setCaption(_("Select amount of items to store to cart.")); + break; case StoreRemove: // TRANSLATORS: amount window message setCaption(_("Select amount of items to retrieve.")); break; + case CartRemove: + // TRANSLATORS: amount window message + setCaption(_("Select amount of items to retrieve from cart.")); + break; case ItemSplit: // TRANSLATORS: amount window message setCaption(_("Select amount of items to split.")); -- cgit v1.2.3-60-g2f50