From 3eb71b6f5e3a60de5b597ba2f600f3bb57fccde6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 28 Jul 2013 23:41:10 +0300 Subject: move bools in itemcontainer. --- src/gui/widgets/itemcontainer.cpp | 30 +++++++++++++++--------------- src/gui/widgets/itemcontainer.h | 38 +++++++++++++++++++------------------- 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 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 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 -- cgit v1.2.3-70-g09d2