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/outfitwindow.cpp | |
parent | 7d3059516fc25134d0d29b497e546f2846162399 (diff) | |
download | plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2 plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/outfitwindow.cpp')
-rw-r--r-- | src/gui/outfitwindow.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index cf66fae76..8afc92b43 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -57,8 +57,21 @@ float OutfitWindow::mAlpha = 1.0; OutfitWindow::OutfitWindow(): Window(_("Outfits"), false, nullptr, "outfits.xml"), + ActionListener(), + mPreviousButton(new Button(_("<"), "previous", this)), + mNextButton(new Button(_(">"), "next", this)), + mEquipButtom(new Button(_("Equip"), "equip", this)), + mCurrentLabel(new Label(strprintf(_("Outfit: %d"), 1))), + mUnequipCheck(new CheckBox(_("Unequip first"), + serverConfig.getValueBool("OutfitUnequip0", true))), + mAwayOutfitCheck(new CheckBox(_("Away outfit"), + serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1))), + mKeyLabel(new Label(strprintf(_("Key: %s"), + keyName(mCurrentOutfit).c_str()))), mBoxWidth(33), mBoxHeight(33), + mCursorPosX(0), + mCursorPosY(0), mGridWidth(4), mGridHeight(4), mItemClicked(false), @@ -80,19 +93,8 @@ OutfitWindow::OutfitWindow(): mBorderColor = Theme::getThemeColor(Theme::BORDER, 64); mBackgroundColor = Theme::getThemeColor(Theme::BACKGROUND, 32); - mPreviousButton = new Button(_("<"), "previous", this); - mNextButton = new Button(_(">"), "next", this); - mCurrentLabel = new Label(strprintf(_("Outfit: %d"), 1)); mCurrentLabel->setAlignment(gcn::Graphics::CENTER); - mKeyLabel = new Label(strprintf(_("Key: %s"), - keyName(mCurrentOutfit).c_str())); mKeyLabel->setAlignment(gcn::Graphics::CENTER); - mUnequipCheck = new CheckBox(_("Unequip first"), - serverConfig.getValueBool("OutfitUnequip0", true)); - mEquipButtom = new Button(_("Equip"), "equip", this); - - mAwayOutfitCheck = new CheckBox(_("Away outfit"), - serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1)); mUnequipCheck->setActionEventId("unequip"); mUnequipCheck->addActionListener(this); |