summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-05 17:15:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-05 17:15:59 +0300
commit45460ca58b3cbf6d92fe3cac1311bbfc9d00e841 (patch)
tree5f7da40a39218322b09338d990bf2bda4cd49b80 /src/gui/windows/inventorywindow.cpp
parent84c27f3885cc075070876603c223b00fc763eb43 (diff)
downloadplus-45460ca58b3cbf6d92fe3cac1311bbfc9d00e841.tar.gz
plus-45460ca58b3cbf6d92fe3cac1311bbfc9d00e841.tar.bz2
plus-45460ca58b3cbf6d92fe3cac1311bbfc9d00e841.tar.xz
plus-45460ca58b3cbf6d92fe3cac1311bbfc9d00e841.zip
Build parts of inventorytype.h only if supported server enabled.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r--src/gui/windows/inventorywindow.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 5712bb436..3ef2dec5e 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -131,10 +131,12 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mSortDropDown->setSelected(config.getIntValue(
"storageSortOrder"));
break;
+#ifdef EATHENA_SUPPORT
case InventoryType::CART:
mSortDropDown->setSelected(config.getIntValue(
"cartSortOrder"));
break;
+#endif
};
}
else
@@ -269,6 +271,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
break;
}
+#ifdef EATHENA_SUPPORT
case InventoryType::CART:
{
// TRANSLATORS: storage button
@@ -298,6 +301,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
place(6, 6, mInvCloseButton);
break;
}
+#endif
default:
case InventoryType::TRADE:
@@ -375,10 +379,12 @@ void InventoryWindow::storeSortOrder() const
config.setValue("storageSortOrder",
mSortDropDown->getSelected());
break;
+#ifdef EATHENA_SUPPORT
case InventoryType::CART:
config.setValue("cartSortOrder",
mSortDropDown->getSelected());
break;
+#endif
};
}
}
@@ -793,7 +799,9 @@ void InventoryWindow::close()
switch (mInventory->getType())
{
case InventoryType::INVENTORY:
+#ifdef EATHENA_SUPPORT
case InventoryType::CART:
+#endif
setVisible(false);
break;
@@ -823,8 +831,14 @@ void InventoryWindow::updateWeight()
if (!mInventory || !mWeightBar)
return;
const InventoryType::Type type = mInventory->getType();
+#ifdef EATHENA_SUPPORT
if (type != InventoryType::INVENTORY && type != InventoryType::CART)
+#else
+ if (type != InventoryType::INVENTORY)
+#endif
+ {
return;
+ }
const bool isInv = type == InventoryType::INVENTORY;
const int total = PlayerInfo::getAttribute(isInv
@@ -940,8 +954,14 @@ void InventoryWindow::widgetResized(const Event &event)
if (!mInventory)
return;
const InventoryType::Type type = mInventory->getType();
+#ifdef EATHENA_SUPPORT
if (type != InventoryType::INVENTORY && type != InventoryType::CART)
+#else
+ if (type != InventoryType::INVENTORY)
+#endif
+ {
return;
+ }
if (getWidth() < 600)
{