diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-06 20:57:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-06 22:58:35 +0300 |
commit | 4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f (patch) | |
tree | a776928bb1339cdd29eb2e54d50eb3fa6e3448d7 /src/gui/inventorywindow.cpp | |
parent | 22ed653d8b630c813333d5c73a4ca02dede2a5a5 (diff) | |
download | mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.gz mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.bz2 mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.xz mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r-- | src/gui/inventorywindow.cpp | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index 67faedbad..0f1a0ed9e 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -91,8 +91,33 @@ InventoryWindow::WindowList InventoryWindow::instances; InventoryWindow::InventoryWindow(Inventory *const inventory): Window("Inventory", false, nullptr, "inventory.xml"), + ActionListener(), + KeyListener(), + SelectionListener(), + InventoryListener(), mInventory(inventory), + mUseButton(nullptr), mDropButton(nullptr), + mSplitButton(nullptr), + mOutfitButton(nullptr), + mShopButton(nullptr), + mEquipmentButton(nullptr), + mStoreButton(nullptr), + mRetrieveButton(nullptr), + mCloseButton(nullptr), + mWeightLabel(nullptr), + mSlotsLabel(new Label(_("Slots:"))), + mFilterLabel(new Label(_("Filter:"))), + mWeightBar(nullptr), + mSlotsBar(new ProgressBar(0.0f, 100, 20, Theme::PROG_INVY_SLOTS)), + mFilter(nullptr), + mSortModel(new SortListModel()), + mSortDropDown(new DropDown(mSortModel, this, "sort")), + mNameFilter(new TextField("", true, this, "namefilter", true)), + mSortDropDownCell(nullptr), + mNameFilterCell(nullptr), + mFilterCell(nullptr), + mSlotsBarCell(nullptr), mSplit(false), mCompactMode(false) { @@ -129,21 +154,13 @@ InventoryWindow::InventoryWindow(Inventory *const inventory): mItems, getOptionBool("showbackground"), "inventory_background.xml"); invenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER); - mSlotsLabel = new Label(_("Slots:")); - mSlotsBar = new ProgressBar(0.0f, 100, 20, Theme::PROG_INVY_SLOTS); - const int size = config.getIntValue("fontSize"); mFilter = new TabStrip("filter_" + getWindowName(), size + 8); mFilter->addActionListener(this); mFilter->setActionEventId("tag_"); - mSortModel = new SortListModel(); - mSortDropDown = new DropDown(mSortModel, this, "sort"); mSortDropDown->setSelected(0); - mFilterLabel = new Label(_("Filter:")); - mNameFilter = new TextField("", true, this, "namefilter", true); - StringVect tags = ItemDB::getTags(); for (unsigned f = 0; f < tags.size(); f ++) mFilter->addButton(tags[f]); |