summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itempopup.cpp')
-rw-r--r--src/gui/itempopup.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index 192a5e116..f9cbb92dd 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -51,34 +51,32 @@
ItemPopup::ItemPopup():
Popup("ItemPopup", "itempopup.xml"),
- mIcon(nullptr),
+ mItemName(new Label),
+ mItemDesc(new TextBox),
+ mItemEffect(new TextBox),
+ mItemWeight(new TextBox),
+ mIcon(new Icon(nullptr)),
mLastName(""),
mLastColor(1)
{
// Item Name
- mItemName = new Label;
mItemName->setFont(boldFont);
mItemName->setPosition(getPadding(), getPadding());
const int fontHeight = getFont()->getHeight();
// Item Description
- mItemDesc = new TextBox;
mItemDesc->setEditable(false);
mItemDesc->setPosition(getPadding(), fontHeight);
// Item Effect
- mItemEffect = new TextBox;
mItemEffect->setEditable(false);
mItemEffect->setPosition(getPadding(), 2 * fontHeight + 2 * getPadding());
// Item Weight
- mItemWeight = new TextBox;
mItemWeight->setEditable(false);
mItemWeight->setPosition(getPadding(), 3 * fontHeight + 4 * getPadding());
- mIcon = new Icon(nullptr);
-
add(mItemName);
add(mItemDesc);
add(mItemEffect);