summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-23 06:35:15 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-23 06:35:15 +0300
commit51c1436f27042c1a84aa3d18aa500385abc7f57b (patch)
tree57271524323982261ed182a73056109591291553 /src/gui/windows
parent144484e103cf468dbc70ecdf285de233d28aa957 (diff)
downloadmanaverse-51c1436f27042c1a84aa3d18aa500385abc7f57b.tar.gz
manaverse-51c1436f27042c1a84aa3d18aa500385abc7f57b.tar.bz2
manaverse-51c1436f27042c1a84aa3d18aa500385abc7f57b.tar.xz
manaverse-51c1436f27042c1a84aa3d18aa500385abc7f57b.zip
Remove default parameters from itemamountwindow.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/inventorywindow.cpp64
-rw-r--r--src/gui/windows/itemamountwindow.h6
-rw-r--r--src/gui/windows/maileditwindow.cpp5
-rw-r--r--src/gui/windows/shopwindow.cpp6
-rw-r--r--src/gui/windows/tradewindow.cpp5
5 files changed, 65 insertions, 21 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index aca7c583a..3a62686ce 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -440,12 +440,18 @@ void InventoryWindow::action(const ActionEvent &event)
if (storageWindow != nullptr)
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::StoreAdd,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
}
else if ((cartWindow != nullptr) && cartWindow->isWindowVisible())
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::CartAdd,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
}
}
else if (eventId == "sort")
@@ -507,27 +513,38 @@ void InventoryWindow::action(const ActionEvent &event)
else
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::ItemDrop,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
}
}
}
else if (eventId == "split")
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::ItemSplit,
- this, item,
- (item->getQuantity() - 1));
+ this,
+ item,
+ item->getQuantity() - 1,
+ 9);
}
else if (eventId == "retrieve")
{
if (storageWindow != nullptr)
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::StoreRemove,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
}
else if ((cartWindow != nullptr) && cartWindow->isWindowVisible())
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::CartRemove,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
}
}
}
@@ -611,7 +628,9 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
ItemAmountWindow::showWindow(
ItemAmountWindowUsage::StoreAdd,
inventoryWindow,
- item);
+ item,
+ 0,
+ 0);
}
else
{
@@ -628,7 +647,9 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
ItemAmountWindow::showWindow(
ItemAmountWindowUsage::StoreRemove,
inventoryWindow,
- item);
+ item,
+ 0,
+ 0);
}
else
{
@@ -646,7 +667,10 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
if (event.getButton() == MouseButton::RIGHT)
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::TradeAdd,
- tradeWindow, item);
+ tradeWindow,
+ item,
+ 0,
+ 0);
}
else
{
@@ -662,7 +686,10 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
{
ItemAmountWindow::showWindow(
ItemAmountWindowUsage::StoreAdd,
- inventoryWindow, item);
+ inventoryWindow,
+ item,
+ 0,
+ 0);
}
else if (tradeWindow != nullptr &&
tradeWindow->isWindowVisible())
@@ -671,7 +698,10 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
return;
ItemAmountWindow::showWindow(
ItemAmountWindowUsage::TradeAdd,
- tradeWindow, item);
+ tradeWindow,
+ item,
+ 0,
+ 0);
}
else
{
@@ -684,7 +714,10 @@ void InventoryWindow::mouseClicked(MouseEvent &event)
{
ItemAmountWindow::showWindow(
ItemAmountWindowUsage::StoreRemove,
- inventoryWindow, item);
+ inventoryWindow,
+ item,
+ 0,
+ 0);
}
}
}
@@ -755,7 +788,10 @@ void InventoryWindow::valueChanged(const SelectionEvent &event A_UNUSED)
canSplit(mItems->getSelectedItem()))
{
ItemAmountWindow::showWindow(ItemAmountWindowUsage::ItemSplit,
- this, item, item->getQuantity() - 1);
+ this,
+ item,
+ item->getQuantity() - 1,
+ 0);
}
updateButtons(item);
}
diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h
index 97f539ac9..ca0bd4955 100644
--- a/src/gui/windows/itemamountwindow.h
+++ b/src/gui/windows/itemamountwindow.h
@@ -80,8 +80,8 @@ class ItemAmountWindow final : public Window,
static void showWindow(const ItemAmountWindowUsageT usage,
Window *const parent,
Item *const item,
- int maxRange = 0,
- const int tag = 0);
+ int maxRange,
+ const int tag);
~ItemAmountWindow();
@@ -96,7 +96,7 @@ class ItemAmountWindow final : public Window,
ItemAmountWindow(const ItemAmountWindowUsageT usage,
Window *const parent,
Item *const item,
- const int maxRange = 0);
+ const int maxRange);
/**< Item amount caption. */
IntTextField *mItemAmountTextField A_NONNULLPOINTER;
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp
index a47b284de..5c7b8efec 100644
--- a/src/gui/windows/maileditwindow.cpp
+++ b/src/gui/windows/maileditwindow.cpp
@@ -151,7 +151,10 @@ void MailEditWindow::action(const ActionEvent &event)
return;
ItemAmountWindow::showWindow(ItemAmountWindowUsage::MailAdd,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
}
}
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 757ffd902..d3b37b039 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -399,7 +399,8 @@ void ShopWindow::action(const ActionEvent &event)
ItemAmountWindow::showWindow(ItemAmountWindowUsage::ShopBuyAdd,
this,
item,
- sumAmount(item));
+ sumAmount(item),
+ 0);
}
else
{
@@ -407,7 +408,8 @@ void ShopWindow::action(const ActionEvent &event)
ItemAmountWindowUsage::ShopSellAdd,
this,
item,
- sumAmount(item));
+ sumAmount(item),
+ 0);
}
}
}
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index d6b39e8f1..413945660 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -399,7 +399,10 @@ void TradeWindow::action(const ActionEvent &event)
// Choose amount of items to trade
ItemAmountWindow::showWindow(ItemAmountWindowUsage::TradeAdd,
- this, item);
+ this,
+ item,
+ 0,
+ 0);
setStatus(PREPARING);
}