summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-28 23:41:10 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-28 23:41:10 +0300
commit3eb71b6f5e3a60de5b597ba2f600f3bb57fccde6 (patch)
treebee625a283f1bfee9c8f3bb1589743d07f8eba5e
parent4dbd8c4f4b97a9d65e407151773f65ee1f9dbae7 (diff)
downloadmv-3eb71b6f5e3a60de5b597ba2f600f3bb57fccde6.tar.gz
mv-3eb71b6f5e3a60de5b597ba2f600f3bb57fccde6.tar.bz2
mv-3eb71b6f5e3a60de5b597ba2f600f3bb57fccde6.tar.xz
mv-3eb71b6f5e3a60de5b597ba2f600f3bb57fccde6.zip
move bools in itemcontainer.
-rw-r--r--src/gui/widgets/itemcontainer.cpp30
-rw-r--r--src/gui/widgets/itemcontainer.h38
2 files changed, 34 insertions, 34 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 10a1b7b8d..e815b1541 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -164,35 +164,35 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
gcn::MouseListener(),
gcn::WidgetListener(),
mInventory(inventory),
+ mSelImg(Theme::getImageFromThemeXml("item_selection.xml", "")),
+ mName(),
+ mItemPopup(new ItemPopup),
+ mShowMatrix(nullptr),
+ mSkin(Theme::instance() ? Theme::instance()->load(
+ "itemcontainer.xml", "") : nullptr),
+ mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
+ mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
+ mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
+ mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)),
+ mSelectionListeners(),
mGridColumns(1),
mGridRows(1),
- mSelImg(Theme::getImageFromThemeXml("item_selection.xml", "")),
mSelectedIndex(-1),
mHighlightedIndex(-1),
mLastUsedSlot(-1),
- mSelectionStatus(SEL_NONE),
- mForceQuantity(forceQuantity),
- mSwapItems(false),
- mDescItems(false),
mTag(0),
mSortType(0),
- mName(),
- mItemPopup(new ItemPopup),
- mShowMatrix(nullptr),
mClicks(1),
- mSkin(Theme::instance() ? Theme::instance()->load(
- "itemcontainer.xml", "") : nullptr),
mBoxWidth(mSkin ? mSkin->getOption("boxWidth", 35) : 35),
mBoxHeight(mSkin ? mSkin->getOption("boxHeight", 43) : 43),
mEquippedTextPadding(mSkin ? mSkin->getOption(
"equippedTextPadding", 29) : 29),
mPaddingItemX(mSkin ? mSkin->getOption("paddingItemX", 0) : 0),
mPaddingItemY(mSkin ? mSkin->getOption("paddingItemY", 0) : 0),
- mSelectionListeners(),
- mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
- mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
- mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
- mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE))
+ mSelectionStatus(SEL_NONE),
+ mForceQuantity(forceQuantity),
+ mSwapItems(false),
+ mDescItems(false)
{
setFocusable(true);
addKeyListener(this);
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 3358b113c..da9167a7e 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -193,36 +193,36 @@ class ItemContainer final : public gcn::Widget,
int getSlotIndex(const int x, const int y) const;
Inventory *mInventory;
- int mGridColumns, mGridRows;
Image *mSelImg;
- int mSelectedIndex, mHighlightedIndex;
- int mLastUsedSlot;
- SelectionState mSelectionStatus;
- bool mForceQuantity;
- bool mSwapItems;
- bool mDescItems;
- int mTag;
- int mSortType;
std::string mName;
ItemPopup *mItemPopup;
int *mShowMatrix;
- int mClicks;
Skin *mSkin;
+ gcn::Color mEquipedColor;
+ gcn::Color mEquipedColor2;
+ gcn::Color mUnEquipedColor;
+ gcn::Color mUnEquipedColor2;
+ typedef std::list<gcn::SelectionListener*> SelectionListenerList;
+ typedef SelectionListenerList::iterator SelectionListenerIterator;
+ SelectionListenerList mSelectionListeners;
+ int mGridColumns;
+ int mGridRows;
+ int mSelectedIndex;
+ int mHighlightedIndex;
+ int mLastUsedSlot;
+ int mTag;
+ int mSortType;
+ int mClicks;
int mBoxWidth;
int mBoxHeight;
int mEquippedTextPadding;
int mPaddingItemX;
int mPaddingItemY;
-
- typedef std::list<gcn::SelectionListener*> SelectionListenerList;
- typedef SelectionListenerList::iterator SelectionListenerIterator;
-
- SelectionListenerList mSelectionListeners;
- gcn::Color mEquipedColor;
- gcn::Color mEquipedColor2;
- gcn::Color mUnEquipedColor;
- gcn::Color mUnEquipedColor2;
+ SelectionState mSelectionStatus;
+ bool mForceQuantity;
+ bool mSwapItems;
+ bool mDescItems;
};
#endif // GUI_WIDGETS_ITEMCONTAINER_H