summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-06 20:57:24 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-06 22:58:35 +0300
commit4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f (patch)
treea776928bb1339cdd29eb2e54d50eb3fa6e3448d7 /src/gui/equipmentwindow.cpp
parent22ed653d8b630c813333d5c73a4ca02dede2a5a5 (diff)
downloadmv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.gz
mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.bz2
mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.xz
mv-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.zip
Improve constructors in some classes.
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index e6cb2b9a8..1265d2119 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -57,18 +57,20 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
Being *const being,
const bool foring):
Window(_("Equipment"), false, nullptr, "equipment.xml"),
+ ActionListener(),
mEquipment(equipment),
+ mItemPopup(new ItemPopup),
+ mPlayerBox(new PlayerBox("equipment_playerbox.xml")),
+ mUnequip(new Button(_("Unequip"), "unequip", this)),
mSelected(-1),
mForing(foring),
- mImageSet(nullptr)
+ mImageSet(nullptr),
+ mBeing(being)
{
- mBeing = being;
- mItemPopup = new ItemPopup;
if (setupWindow)
setupWindow->registerWindowForReset(this);
// Control that shows the Player
- mPlayerBox = new PlayerBox("equipment_playerbox.xml");
mPlayerBox->setDimension(gcn::Rectangle(50, 80, 74, 168));
mPlayerBox->setPlayer(being);
@@ -91,7 +93,6 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
loadWindowState();
- mUnequip = new Button(_("Unequip"), "unequip", this);
const gcn::Rectangle &area = getChildrenArea();
const int buttonPadding = getOption("buttonPadding", 5);
mUnequip->setPosition(area.width - mUnequip->getWidth() - buttonPadding,