summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-30 22:15:24 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-30 22:15:24 +0300
commitd70d41864853924a456595875b6811b74222dd7c (patch)
tree99485951528734a54cd2f8ad297e76860f7ba9d4 /src/gui
parenta619290b502486ea5b1ff5dd604864ab78c5edc9 (diff)
downloadmv-d70d41864853924a456595875b6811b74222dd7c.tar.gz
mv-d70d41864853924a456595875b6811b74222dd7c.tar.bz2
mv-d70d41864853924a456595875b6811b74222dd7c.tar.xz
mv-d70d41864853924a456595875b6811b74222dd7c.zip
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp4
-rw-r--r--src/gui/windows/inventorywindow.cpp16
-rw-r--r--src/gui/windows/itemamountwindow.cpp1
-rw-r--r--src/gui/windows/shopwindow.cpp2
-rw-r--r--src/gui/windows/shopwindow.h1
6 files changed, 18 insertions, 8 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 6e7b94e44..5bed32f13 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1723,6 +1723,8 @@ void PopupMenu::showPopup(Window *const parent,
case InventoryType::CART:
case InventoryType::TRADE:
+ case InventoryType::NPC:
+ case InventoryType::TYPE_END:
default:
break;
}
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 915116491..64c1ad50a 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -427,6 +427,7 @@ void ItemContainer::mousePressed(MouseEvent &event)
src = DRAGDROP_SOURCE_CART;
break;
default:
+ case InventoryType::TYPE_END:
break;
}
if (mSelectedIndex == index && mClicks != 2)
@@ -525,6 +526,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
dst = DRAGDROP_SOURCE_CART;
break;
default:
+ case InventoryType::TYPE_END:
break;
}
int srcContainer = -1;
@@ -561,7 +563,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
inventory = PlayerInfo::getCartInventory();
}
else if (src == DRAGDROP_SOURCE_CART
- && dst == DRAGDROP_SOURCE_STORAGE)
+ && dst == DRAGDROP_SOURCE_STORAGE)
{
srcContainer = InventoryType::CART;
dstContainer = InventoryType::STORAGE;
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 0a6c4c37f..bd6bdfc7f 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -120,6 +120,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
case InventoryType::INVENTORY:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::TYPE_END:
default:
mSortDropDown->setSelected(config.getIntValue(
"inventorySortOrder"));
@@ -207,7 +208,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mShopButton = new Button(this, _("S"), "shop", this);
// TRANSLATORS: inventory equipment button
mEquipmentButton = new Button(this, _("E"), "equipment", this);
- mWeightBar = new ProgressBar(this, 0.0F, 100, 0, Theme::PROG_WEIGHT,
+ mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
+ Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
@@ -247,7 +249,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
// TRANSLATORS: storage button
mStoreButton = new Button(this, _("Store"), "store", this);
// TRANSLATORS: storage button
- mRetrieveButton = new Button(this, _("Retrieve"), "retrieve", this);
+ mRetrieveButton = new Button(this, _("Retrieve"),
+ "retrieve", this);
// TRANSLATORS: storage button
mInvCloseButton = new Button(this, _("Close"), "close", this);
@@ -269,11 +272,13 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
// TRANSLATORS: storage button
mStoreButton = new Button(this, _("Store"), "store", this);
// TRANSLATORS: storage button
- mRetrieveButton = new Button(this, _("Retrieve"), "retrieve", this);
+ mRetrieveButton = new Button(this, _("Retrieve"),
+ "retrieve", this);
// TRANSLATORS: storage button
mInvCloseButton = new Button(this, _("Close"), "close", this);
- mWeightBar = new ProgressBar(this, 0.0F, 100, 0, Theme::PROG_WEIGHT,
+ mWeightBar = new ProgressBar(this, 0.0F, 100, 0,
+ Theme::PROG_WEIGHT,
"weightprogressbar.xml", "weightprogressbar_fill.xml");
mWeightBar->setColor(getThemeColor(Theme::WEIGHT_BAR),
getThemeColor(Theme::WEIGHT_BAR_OUTLINE));
@@ -295,6 +300,7 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
default:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::TYPE_END:
break;
};
@@ -348,6 +354,7 @@ void InventoryWindow::storeSortOrder() const
case InventoryType::INVENTORY:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::TYPE_END:
default:
config.setValue("inventorySortOrder",
mSortDropDown->getSelected());
@@ -781,6 +788,7 @@ void InventoryWindow::close()
default:
case InventoryType::TRADE:
case InventoryType::NPC:
+ case InventoryType::TYPE_END:
break;
}
}
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 5b714774c..fe081a799 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -22,7 +22,6 @@
#include "gui/windows/itemamountwindow.h"
-#include "inventory.h"
#include "item.h"
#include "being/playerinfo.h"
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index b04e60c59..9240b8e8c 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -37,7 +37,6 @@
#include "gui/widgets/button.h"
#include "gui/widgets/checkbox.h"
#include "gui/widgets/containerplacer.h"
-#include "gui/widgets/label.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/layouttype.h"
#include "gui/widgets/scrollarea.h"
@@ -88,6 +87,7 @@ ShopWindow::ShopWindow() :
mTradeItem(nullptr),
mBuyShopItemList(new ShopListBox(this, mBuyShopItems, mBuyShopItems)),
mSellShopItemList(new ShopListBox(this, mSellShopItems, mSellShopItems)),
+ mCurrentShopItemList(nullptr),
mScrollArea(new ScrollArea(this, mBuyShopItemList,
getOptionBool("showbuybackground"), "shop_buy_background.xml")),
// TRANSLATORS: shop window label
diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h
index 8ab765e3c..a3409bbe7 100644
--- a/src/gui/windows/shopwindow.h
+++ b/src/gui/windows/shopwindow.h
@@ -31,7 +31,6 @@
class Button;
class CheckBox;
class Item;
-class Label;
class ScrollArea;
class ShopItem;
class ShopItems;