summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-06 00:04:33 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-06 00:04:33 +0300
commit7b155f111daf5d7ae477b16d0f0789b1113bea74 (patch)
tree2d2711ab1f9daed793171383af1a7e1fa6ff737c /src/gui/widgets/itemcontainer.cpp
parentc3afff20d4989ab2835545715bbe67e5b5d9b353 (diff)
downloadmv-7b155f111daf5d7ae477b16d0f0789b1113bea74.tar.gz
mv-7b155f111daf5d7ae477b16d0f0789b1113bea74.tar.bz2
mv-7b155f111daf5d7ae477b16d0f0789b1113bea74.tar.xz
mv-7b155f111daf5d7ae477b16d0f0789b1113bea74.zip
Fix some issues after auto checking.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index c46131379..5994b1e1a 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -61,10 +61,9 @@ static const int BOX_HEIGHT = 43;
class ItemIdPair
{
public:
- ItemIdPair(int id, Item* item)
+ ItemIdPair(int id, Item* item) :
+ mId(id), mItem(item)
{
- mId = id;
- mItem = item;
}
int mId;
@@ -166,18 +165,17 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity):
mDescItems(false),
mTag(0),
mSortType(0),
- mShowMatrix(nullptr)
+ mItemPopup(new ItemPopup),
+ mShowMatrix(nullptr),
+ mEquipedColor(Theme::getThemeColor(Theme::ITEM_EQUIPPED)),
+ mUnEquipedColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED))
{
- mItemPopup = new ItemPopup;
setFocusable(true);
mSelImg = Theme::getImageFromTheme("selection.png");
if (!mSelImg)
logger->log1("Error: Unable to load selection.png");
- mEquipedColor = Theme::getThemeColor(Theme::ITEM_EQUIPPED);
- mUnEquipedColor = Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED);
-
addKeyListener(this);
addMouseListener(this);
addWidgetListener(this);