diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
commit | b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (patch) | |
tree | ee27a5a1ace7e5dbc588466dc623013e4d5cea99 /src/gui/statuspopup.cpp | |
parent | 7d3059516fc25134d0d29b497e546f2846162399 (diff) | |
download | manaverse-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz manaverse-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2 manaverse-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz manaverse-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/statuspopup.cpp')
-rw-r--r-- | src/gui/statuspopup.cpp | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp index a593f2fe3..0bba7a505 100644 --- a/src/gui/statuspopup.cpp +++ b/src/gui/statuspopup.cpp @@ -42,61 +42,46 @@ #include "debug.h" -StatusPopup::StatusPopup(): - Popup("StatusPopup", "statuspopup.xml") +StatusPopup::StatusPopup() : + Popup("StatusPopup", "statuspopup.xml"), + mMoveType(new Label), + mCrazyMoveType(new Label), + mMoveToTargetType(new Label), + mFollowMode(new Label), + mAttackType(new Label), + mAttackWeaponType(new Label), + mDropCounter(new Label), + mPickUpType(new Label), + mMapType(new Label), + mMagicAttackType(new Label), + mPvpAttackType(new Label), + mDisableGameModifiers(new Label), + mImitationMode(new Label), + mAwayMode(new Label), + mCameraMode(new Label) { - const int fontHeight = getFont()->getHeight(); - mMoveType = new Label; mMoveType->setPosition(getPadding(), getPadding()); - - mCrazyMoveType = new Label; mCrazyMoveType->setPosition(getPadding(), fontHeight + getPadding()); - - mMoveToTargetType = new Label; mMoveToTargetType->setPosition(getPadding(), 2 * fontHeight + getPadding()); - - mFollowMode = new Label; mFollowMode->setPosition(getPadding(), 3 * fontHeight + getPadding()); - - mAttackWeaponType = new Label; mAttackWeaponType->setPosition(getPadding(), 4 + 4 * fontHeight + getPadding()); - - mAttackType = new Label; mAttackType->setPosition(getPadding(), 4 + 5 * fontHeight + getPadding()); - - mMagicAttackType = new Label; mMagicAttackType->setPosition(getPadding(), 4 + 6 * fontHeight + getPadding()); - - mPvpAttackType = new Label; mPvpAttackType->setPosition(getPadding(), 4 + 7 * fontHeight + getPadding()); - - mDropCounter = new Label; mDropCounter->setPosition(getPadding(), 8 + 8 * fontHeight + getPadding()); - - mPickUpType = new Label; mPickUpType->setPosition(getPadding(), 8 + 9 * fontHeight + getPadding()); - - mMapType = new Label; mMapType->setPosition(getPadding(), 12 + 10 * fontHeight + getPadding()); - - mImitationMode = new Label; mImitationMode->setPosition(getPadding(), 16 + 11 * fontHeight + getPadding()); - - mAwayMode = new Label; mAwayMode->setPosition(getPadding(), 16 + 12 * fontHeight + getPadding()); - - mCameraMode = new Label; mCameraMode->setPosition(getPadding(), 16 + 13 * fontHeight + getPadding()); - - mDisableGameModifiers = new Label; mDisableGameModifiers->setPosition(getPadding(), 20 + 14 * fontHeight + getPadding()); |