summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-15 00:26:35 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-15 00:26:35 +0300
commitff516e9f60e9554e8938d04192a8e5ec9efb5647 (patch)
treeb134dd0202377c5b182f62870b983fe078700e28 /src/gui/windows
parent269f642099ec8e4c6bcf735496c32ee8019aaf1b (diff)
downloadmv-ff516e9f60e9554e8938d04192a8e5ec9efb5647.tar.gz
mv-ff516e9f60e9554e8938d04192a8e5ec9efb5647.tar.bz2
mv-ff516e9f60e9554e8938d04192a8e5ec9efb5647.tar.xz
mv-ff516e9f60e9554e8938d04192a8e5ec9efb5647.zip
fix code style.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/buydialog.cpp10
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/questswindow.cpp2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 5ae15dfa7..86e819121 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -162,9 +162,9 @@ BuyDialog::BuyDialog() :
Window(_("Create items"), false, nullptr, "buy.xml"),
ActionListener(),
SelectionListener(),
- mNpcId(-2),
mSortModel(nullptr),
mSortDropDown(nullptr),
+ mNpcId(-2),
mMoney(0),
mAmountItems(0),
mMaxItems(0),
@@ -178,9 +178,9 @@ BuyDialog::BuyDialog(const int npcId) :
Window(_("Buy"), false, nullptr, "buy.xml"),
ActionListener(),
SelectionListener(),
- mNpcId(npcId),
mSortModel(nullptr),
mSortDropDown(nullptr),
+ mNpcId(npcId),
mMoney(0),
mAmountItems(0),
mMaxItems(0),
@@ -194,13 +194,13 @@ BuyDialog::BuyDialog(std::string nick) :
Window(_("Buy"), false, nullptr, "buy.xml"),
ActionListener(),
SelectionListener(),
+ mSortModel(new SortListModelBuy),
+ mSortDropDown(new DropDown(this, mSortModel, false, false, this, "sort")),
mNpcId(-1),
mMoney(0),
mAmountItems(0),
mMaxItems(0),
- mNick(nick),
- mSortModel(new SortListModelBuy),
- mSortDropDown(new DropDown(this, mSortModel, false, false, this, "sort"))
+ mNick(nick)
{
init();
}
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 6f48b3f41..1df282189 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -117,7 +117,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mCreateButton(new Button(this, _("Create"), "create", this)),
// TRANSLATORS: char create dialog button
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
- mPlayer(new Being(0, ActorSprite::PLAYER, static_cast<uint16_t>(mRace),
+ mPlayer(new Being(0, ActorSprite::PLAYER, static_cast<uint16_t>(0U),
nullptr)),
mPlayerBox(new PlayerBox(this, mPlayer, "charcreate_playerbox.xml",
"charcreate_selectedplayerbox.xml")),
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index b78252bef..b1355ba46 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -68,7 +68,7 @@ OutfitWindow::OutfitWindow():
serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1))),
// TRANSLATORS: outfits window label
mKeyLabel(new Label(this, strprintf(_("Key: %s"),
- keyName(mCurrentOutfit).c_str()))),
+ keyName(0).c_str()))),
mBorderColor(getThemeColor(Theme::BORDER, 64)),
mBackgroundColor(getThemeColor(Theme::BACKGROUND, 32)),
mCurrentOutfit(0),
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 0aaac9b96..8d4eae9c8 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -154,7 +154,7 @@ QuestsWindow::QuestsWindow() :
mText->setLinkHandler(mItemLinkHandler);
mTextScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mQuestsListBox->setWidth(500);
- if (gui && gui->getNpcFont()->getHeight() < 20)
+ if (!gui || gui->getNpcFont()->getHeight() < 20)
mQuestsListBox->setRowHeight(20);
else
mQuestsListBox->setRowHeight(gui->getNpcFont()->getHeight());