diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-18 02:06:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-18 02:06:44 +0300 |
commit | 2257406db0fd374e929def04525671c2826306c2 (patch) | |
tree | 0df3ef6435664fc962b772302e716adf01855825 /src/gui | |
parent | 4cd44430deb5a7efc030839a133fe8510327fc24 (diff) | |
download | manaplus-2257406db0fd374e929def04525671c2826306c2.tar.gz manaplus-2257406db0fd374e929def04525671c2826306c2.tar.bz2 manaplus-2257406db0fd374e929def04525671c2826306c2.tar.xz manaplus-2257406db0fd374e929def04525671c2826306c2.zip |
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/emotepopup.cpp | 9 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 1 | ||||
-rw-r--r-- | src/gui/spellpopup.cpp | 2 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 2 | ||||
-rw-r--r-- | src/gui/whoisonline.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/textbox.cpp | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/emotepopup.cpp b/src/gui/emotepopup.cpp index a286f78e8..39017ac91 100644 --- a/src/gui/emotepopup.cpp +++ b/src/gui/emotepopup.cpp @@ -197,12 +197,15 @@ void EmotePopup::recalculateSize() ++mRowCount; if (mRowCount) + { mColumnCount = emoteCount / mRowCount; + if (emoteCount % mRowCount > 0) + ++ mColumnCount; + } else + { mColumnCount = 1; - - if (emoteCount % mRowCount > 0) - ++mColumnCount; + } setContentSize(mColumnCount * gridWidth, mRowCount * gridHeight); } diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index 6b3d6d4d3..cc3063a68 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -228,7 +228,6 @@ static const char *speechModeToString(Being::Speech mode) case Being::NAME_IN_BUBBLE: return _("Bubbles with names"); } - return ""; } const char *Setup_Video::overlayDetailToString(int detail) diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp index 66d69b197..48037f03e 100644 --- a/src/gui/spellpopup.cpp +++ b/src/gui/spellpopup.cpp @@ -114,8 +114,6 @@ void SpellPopup::view(int x, int y) { if (y > getHeight() + distance) posY = y - getHeight() - distance; - else - y = 0; } setPosition(posX, posY); diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 2e1e15c92..d4c188bfb 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -879,7 +879,7 @@ bool Viewport::isPopupMenuVisible() void Viewport::moveCameraToActor(int actorId, int x, int y) { - if (!player_node) + if (!player_node || !actorSpriteManager) return; Actor *actor = actorSpriteManager->findBeing(actorId); diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index 1efa9c22d..7e4f02426 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -230,7 +230,7 @@ void WhoIsOnline::updateWindow(std::vector<OnlinePlayer*> &friends, if (addedFromSection == true && !disregard.empty()) { mBrowserBox->addRow("---"); - addedFromSection = false; +// addedFromSection = false; } for (int i = 0; i < static_cast<int>(disregard.size()); i++) { diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 5856a91b1..49b73a76a 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -655,7 +655,7 @@ std::string BrowserBox::getTextAtPos(const int x, const int y) return ""; // mouse position ourside of correct widget (outside of tab) textX = x - textX; - textY = y - textY; +// textY = y - textY; std::string str = ""; diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index a4bc3bc09..575036612 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -116,14 +116,14 @@ void TextBox::setTextWrapped(const std::string &text, int minDimension) mMinWidth = minWidth; wrappedStream.clear(); wrappedStream.str(""); - spacePos = 0; +// spacePos = 0; lastNewlinePos = 0; newlinePos = text.find("\n", lastNewlinePos); if (newlinePos == std::string::npos) newlinePos = text.size(); line = text.substr(lastNewlinePos, newlinePos - lastNewlinePos); - width = 0; +// width = 0; break; } else |